KevySaysBeNice
[H]ard|Gawd
- Joined
- Dec 7, 2001
- Messages
- 1,452
Hi all!
I've got a fairly simple page I'm working on in ASP.NET/VB.NET and I'm having a strange problem that I can't figure out.
Essentially I have a form with an <asp:button> on it. When clicked, the page_load sub in the code behind is called, and so it appears that it's a "postback" however the "ispostback" variable is set to false.
Essentially my page looks like this:
ASP.NET
VB.NET (code behind) - Note that this is where I'd expect IsPostBack to be true (after clicking the submit button) however it's always set to false.
I've got a fairly simple page I'm working on in ASP.NET/VB.NET and I'm having a strange problem that I can't figure out.
Essentially I have a form with an <asp:button> on it. When clicked, the page_load sub in the code behind is called, and so it appears that it's a "postback" however the "ispostback" variable is set to false.
Essentially my page looks like this:
ASP.NET
Code:
<table>
<tr>
<td class="editformtitle">Video File Name</td>
<td><asp:TextBox ID="tbxVideoFileName" runat="server" CssClass="videoeditbox" Columns="70"></asp:TextBox></td>
</tr>
<tr>
<td class="editformtitle">Thumbnail File Name</td>
<td><asp:TextBox ID="tbxThumbnailFileName" runat="server" CssClass="videoeditbox" Columns="70"></asp:TextBox></td>
</tr>
<tr>
<td class="editformtitle">Video Width</td>
<td><asp:TextBox ID="tbxWidth" runat="server" CssClass="videoeditbox" Columns="5"></asp:TextBox></td>
</tr>
<tr>
<td class="editformtitle" >Video Height</td>
<td><asp:TextBox ID="tbxHeight" runat="server" CssClass="videoeditbox" Columns="5"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2" style="padding-top:20px; text-align:center;">
<asp:Button ID="btnSubmit" runat="server" Text="Submit Video" CssClass="videoeditsubmit" />
</td>
</tr>
VB.NET (code behind) - Note that this is where I'd expect IsPostBack to be true (after clicking the submit button) however it's always set to false.
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Not IsPostBack Then
If Not _blnNewVideo Then
PopulateFields()
End If
Else
SubmitVideoChanges()
End If
Catch ex As Exception
Finally
End Try
End Sub