Created
October 30, 2013 06:06
-
-
Save sohel-rana/7227836 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ContentPlaceHolder cp = (ContentPlaceHolder)Page.Master.FindControl("CPH"); | |
TextBox tbName = (TextBox)cp.FindControl("txtName"); | |
TextBox tbAge = (TextBox)cp.FindControl("txtAge"); | |
string script=string.Format(@"function IDIssue() {{ var txtName=document.getElementById('{0}'); var txtAge=document.getElementById('{1}'); alert('your name is '+ txtName.value+' and age is '+txtAge.value); }}",tbName.ClientID, tbAge.ClientID); | |
ClientScript.RegisterClientScriptBlock(this.GetType(), "IDIssue", script, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment