Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Fill object in Masterpage with value of Clientpage

$
0
0

All,
I tried a lot but somehow it does not display the value at the masterpage's object nor does it throw me an error.

At client page I got this:

<asp:Content ID="CP_Usr_Zn" ContentPlaceHolderID="MP_00_ContentPlaceHolder1"  Runat="Server"><script type="text/javascript">
        var WinNetwork = new ActiveXObject("WScript.Network");
        var control = "<%= Page.Master.FindControl("MP_00_form").FindControl("MP_00_UsrIdContainer").ClientID%>";
        document.getElementById(control).value = WinNetwork.UserName;</script>

and at masterpage:

...<body><form id="MP_00_form" runat="server"><div id="top02_Content"><asp:Label ID="CpxPlnYr" runat="server" Text="2099"  Height="60px"  Width="1570px" BackColor="White" ForeColor="#000066" style="text-align:center" BorderStyle="inSet" BorderWidth="1px" TabIndex="1" Font-Bold="True" Font-Size="16px" /> <br><br>&nbsp;&nbsp;&nbsp;<asp:Label ID="Wlcm" runat="server" Text="Welcome " Width="20" BackColor="White" ForeColor="#000066" style="text-align:center" BorderStyle="None" BorderWidth="1px"></asp:Label> &nbsp;<asp:Label ID="MP_00_UsrIdContainer" runat="server" Text=""  Width="167" BackColor="White" ForeColor="#000066" style="text-align:center" BorderStyle="inSet" BorderWidth="1px" TabIndex="1" /> &nbsp;</div>

...


Any help appriciated,
thx in advance
lucio

 


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>