S
smamail
Hi, I have two servers that behave differently (WIn2003, WinXP), when I
open pages on both servers first time the button on the page appears with
it's caption set to "Test" and then after postback on one of servers
(WinXP) it appears with caption "Test" as it should do and on Win2K3-IIS6
it appears with caption "Button"
Can someone tell me what's the problem?
Here is my code (VS.NET2003-VB.NET Web Application)
<!-Global.asax.vb-->
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Session("a") = 1
End Sub
<!--Webform1.aspx-->
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"
enableSessionState=true%>
<body>
<%=Session("a")%>
<form id="Form1" method="post" runat="server">
<asp:Button id=Button1 runat="server" Text="Button"></asp:Button>
</form>
</body>
</HTML>
<!--Webform1.aspx.vb-->
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Session("a") += 1
If Not IsPostBack Then Button1.Text = "test"
End Sub
open pages on both servers first time the button on the page appears with
it's caption set to "Test" and then after postback on one of servers
(WinXP) it appears with caption "Test" as it should do and on Win2K3-IIS6
it appears with caption "Button"
Can someone tell me what's the problem?
Here is my code (VS.NET2003-VB.NET Web Application)
<!-Global.asax.vb-->
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Session("a") = 1
End Sub
<!--Webform1.aspx-->
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"
enableSessionState=true%>
<body>
<%=Session("a")%>
<form id="Form1" method="post" runat="server">
<asp:Button id=Button1 runat="server" Text="Button"></asp:Button>
</form>
</body>
</HTML>
<!--Webform1.aspx.vb-->
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Session("a") += 1
If Not IsPostBack Then Button1.Text = "test"
End Sub