Re: ASP.NET 2.0 Modal Dialog Window & Master Page

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"ABHIJIT B" <abhijitbavdhankar@xxxxxxxxx> wrote in message news:c5788987-0ba3-4f10-880c-4557897d23e3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks Mark

Can you suggest mistake I am making in below code,

I certainly can...

<label id="lblHeader" class="ApplicationLabelStyle" style="font-weight:normal" >DC Application</label>

That's an HTMLControl, not a WebControl, so it won't run server-side. Change it to an <asp:Label> WebControl, or add runat="server"...

Label lblMasterHeader = (Label)Master.FindControl("lblHeader");

That will only work if you change the <label> to an <asp:Label> - otherwise it will be an HTMLGenericControl, so the cast won't work...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

.