Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Oracle VB.NET
I have the following script i need to register into page load how can i register it?
 

<script language="javascript" id="script1" type="text/javascript">
 
function text_reason()
{
alert("scr");

var vlue =document.getElementById('ddlst_Scale_pointers').value ;
//var myvalue ="Textmin" + 1;

for( i=1;i<=vlue;i++)
{
alert(i);
alert("Label VAL :" + document.getElementById('txtpointer').value);
var empt =document.getElementById('txtpointer').value;
alert("Color VAL :" + document.getElementById('txtcolour').value);
var empt1 =document.getElementById('txtcolour').value;

if( empt=="" or empt1="")
{
document.getElementById('txtpointer').focus();
document.getElementById('txtcolour').focus();
return false;

}
// myvalue ="Textmin" + (i+1);
// alert(myvalue );
}

}
</script>
Posted 24-Feb-13 23:28pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Register javascript code from asp.net code behind.
 
protected void Page_Load(object sender, EventArgs e)
{
     string js = "function test(){alert('hello')'}";
     ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "k1", js, true);
}
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

<head></head>
<body >
<form id="Form1" runat="server">
</form>
</body>
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 380
1 OriginalGriff 230
2 DamithSL 220
3 Zoltán Zörgő 170
4 Maciej Los 135
0 OriginalGriff 7,740
1 DamithSL 5,694
2 Sergey Alexandrovich Kryukov 5,404
3 Maciej Los 5,061
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100