First find the div in contentplace holder like this make sure u have an atribute of runat="server" in ur div and controls you want to find. public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ContentPlaceHolder myContent = (ContentPlaceHolder)this.Master.FindControl("ContentPlaceHolder1"); System.Web.UI.Control Testdiv = myContent.FindControl("TestDiv1"); System.Web.UI.Control anchor1 = Testdiv1.FindControl("Your Anchor id"); } } } }
A
Akii Malam
@Akii Malam
Posts
-
How to extract links from a div -
How to call event using javascript?Include jquery library from Jquery.com in header section. Change YOur Function to this ..
<script type="text/javascript" language="javascript">
function fnClickCalc() { var lbl1 = $("#lblFirstNo"); var lbl2 = $("#lblsecondNo"); var lbl3 = $("#lblResult"); lbl3.Text = lbl1.Text + lbl2.Text ; } </script>