Click here to Skip to main content
15,885,806 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have two page
Master page and child page.
How can I set javascript on child page?
I want to check textbox to numeric value using javascript on child page.
Posted
Updated 5-Dec-11 22:29pm
v4
Comments
valerian.precop 1-Dec-11 12:14pm    
I am not sure what do you mean, but you can always use "Page.ClientScript" to register javascript code.
e.g. (I used this code in Page_Load method of the MasterPage) :
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "test", "alert('testing');", true);

Hi,
you can try it

.aspx page write javascript function like
JavaScript
<script type="text/javascript">
function chkEmail() {
           alert('here implement textchange functions');
       }
   <script>


in body textbox

C#
<asp:textbox id="TextBox1" runat="server" onblur="return chkEmail();" xmlns:asp="#unknown">


when ever you textchange it can working fine

happy coding.........</script></script>
 
Share this answer
 
v2
Add ScriptManager to MasterPage and Add the ScriptManagerProxy to the child page as use as normal.
 
Share this answer
 
v4

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900