We know that, Page_ClientValidate function tests if all controls meet asp.net validation criteria. This function is provided by asp.net. But, if we use more than, one validation group in the page, we may have to specify the validation group, we want to validate. For that, give like given below: Page_ClientValidate('ValGroupName')
Then, it will validate only for that validation group
This is a common error. It occurs when we use <%= %> tag inside the head tag with runat="server" given. You can get rid of the error by removing the runat="server" from the head tag. But, sometimes, we want to keep that. We can use <%# %> instead of <%= %>. But, then, the value may not get bound and we may not get the value of the expression. So, when we use <%# %>, we have to add Page.Header.DataBind(); in the Page Load event. More Info
Whenever you want to access the controls of an usercontrol, create public properties for those controls in your usercontrols and you could easily access them in your .aspx page.
Here it goes how... UserControl.
1 public partial class WebUserControl : System.Web.UI.UserControl 2 { 3 public string TextBoxValue { 4 get { return TextBox1.Text; } 5 set { TextBox1.Text = value; } 6 } 7 protected void Page_Load(object sender, EventArgs e) { 8 9 } 10 }
In your .aspx page you can access it either html or code <%@ Register TagPrefix="DS" TagName="TB" Src="~/WebUserControl.ascx" %>
or
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { myTB1.TextBoxValue = "Sample Text"; } }