MasterPage
Example:
Adding a MasterPage to the Project
Master.MasterLabel.Text = "From WebForm";
//The above line would work only if <%@MasterType Directive is added to current page
Importance of UniqueID and ClientId
<asp:TextBox runat="server" ID="txtWebForm"/><input type="button" value="ClientButton" onclick="ShowAlert()" />
<script language="javascript" type="text/javascript"> function ShowAlert() { txt = document.<%=Page.Form.Name%>.<%=txtWebForm.UniqueID%> alert(txt.value); }
</script></asp:Content>
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: