Board index » Web Programming » updateproblem with usercontrol, page and masterpage
|
Safety
|
updateproblem with usercontrol, page and masterpage
Web Programming273
Hi, the situation is the following: There is this masterpage: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="mymaster.master.cs" Inherits="mymaster" %> <%@ Register tagprefix="myc" tagname="BasketSmall" Src="shop/basket_small.ascx" %> <html> <body> <form id="form1" runat="server"> <myc:BasketSmall runat="server" ID="smallbasket" /> <asp:contentplaceholder runat="server" ID="mycontent">sample content </asp:contentplaceholder> </form> </body> </html> The UserControl reads out a session-variable and displays it. Then there is a page which uses the masterpage. It modifies the value of the session-var if a button on the page is clicked and a postback is done. The usercontrol displays the old value and not the new! Only after a new postback (or a reload of the page) the correct value is displayed. In the Page_Load function of the usercontrol is not written: "DataBind();" How can I resolve this problem? Thanks, Alex - |
