Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sub Page_Load not firing in aspx file

0 views
Skip to first unread message

David C. Adler

unread,
May 29, 2002, 5:16:30 PM5/29/02
to
I have the following in my aspx file.

<Script runat="server">

Sub Page_Load
txtDebug.Text = "Page_Load event Fired"
End Sub

</Script>

But nothing happens. I have seen examples of the Sub Page_Load routine in
ASP.Net Unleashed by Steve Walther. From the examples, this should work, but
it isnt. Any ideas?

Thanks in advance.

David

Shane Bauer

unread,
May 29, 2002, 5:20:21 PM5/29/02
to
Is that your whole script or just part of it?

Do you also have the Label control entitled "txtdebug" somewhere in your
app?

For instace, something like this:

<Script runat="server">

Sub Page_Load
txtDebug.Text = "Page_Load event Fired"
End Sub

</Script>
<html>
<asp:label id="txtDebug" runat="server" />
</html>


Let me know.

Shane

"David C. Adler" <dca...@adlercomputing.com> wrote in message
news:e5MkuX1BCHA.2364@tkmsftngp02...

David C. Adler

unread,
May 30, 2002, 10:37:59 AM5/30/02
to
Shane,

Listed below is the entire aspx page. I had just used the code before as an
example. Please note that I have replaced the actual SQL server connect
string info with Xs for this post. Nothing in the Sub Page_Load section is
firing.

Thanks in advance.

David


<%@ Register TagPrefix="CCSCNav" TagName="NavBar"
Src="\Main\Navigation.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="DirectoryAdd.aspx.vb" Inherits="Main.DirectoryAdd"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>CCSC School Directory - Database Maintenance</title>
<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">

<SCRIPT Runat="Server">

Sub Page_Load
Dim strEmployeeID as String
Dim conCCSC as SqlConnection
Dim cmdSQL as SqlCommand
Dim strSQL as String
Dim dtrResult as SQLDataReader

lblDebug.Text = "In Page_Load"
If NOT IsPostBack Then

lblDebug.Text = "Not PostBack"

If Request.QueryString( "ID") Then
strEmployeeID = Request.QueryString( "ID" )

lblDebug.Text = "Query String = " & strEmployeeID

conCCSC = New SqlConnection(
"Server=XXXXX;UID=XXXXX;PWD=XXXXX;Database=XXXXX")
strSQL = "SELECT * from Directory WHERE ID = " & strEmployeeID
cmdSQL = New SqlCommand(strSQL, conCCSC)
conCCSC.Open
dtrResult = cmdSQL.ExecuteReader()
If dtrResult.Read() Then

lblDebug.Text = "Query String = " & strEmployeeID & " and In Reader"

txtID.Text = dtrResult( "ID" )
txtFirstName.Text = dtrResult( "FirstName" )
txtMiddleName.Text = dtrResult( "MiddleName" )
txtLastName.Text = dtrResult( "LastName" )
txtEmail.Text = dtrResult( "Email" )

txtDepartment.Text = dtrResult( "Department" )
txtTitle.Text = dtrResult( "Title" )
txtPhone.Text = dtrResult( "Phone" )
txtExtension.Text = dtrResult( "Extension" )
txtFax.Text = dtrResult( "Fax" )
txtNotes.Text = dtrResult( "Notes" )
txtSearchKeywords.Text = dtrResult( "SearchKeywords" )
txtSpouse.Text = dtrResult( "Spouse" )
txtAddress.Text = dtrResult( "Address" )
txtCity.Text = dtrResult( "City" )

txtZipCode.Text = dtrResult( "ZipCode" )
txtHomePhone.Text = dtrResult( "HomePhone" )
End If
conCCSC.Close
End If
End If
End Sub

</SCRIPT>

<CCSCNAV:NAVBAR id="NavBar1"
strNavDirectoryImage="/images/navigation/Directory_On.gif"
Runat="Server"></CCSCNAV:NAVBAR>
<form id="frmDirectoryEdit" method="post" runat="server">
<asp:panel id="pnlDirectoryEdit" style="Z-INDEX: 101; LEFT: 120px;
POSITION: absolute; TOP: 80px" runat="server" Width="602px" Height="314px">
<TABLE id="tblDirectoryEdit" style="WIDTH: 600px; HEIGHT: 75px"
cellSpacing="0" cellPadding="0" width="600" border="0">
<TR>
<TD style="WIDTH: 600px; HEIGHT: 25px" colSpan="7" height="25">
<asp:Image id="imgTitleBar" runat="server" Width="600px"
Height="24px"
ImageUrl="/images/titles/DirectoryTitleDBMaintenance.gif"></asp:Image></TD>
</TR>
<TR>
<TD style="WIDTH: 600px; HEIGHT: 249px" vAlign="top" align="middle"
bgColor="#ffffe1" colSpan="7" height="249">
<TABLE id="tblInnerDirectoryEdit" cellSpacing="0" cellPadding="0"
width="590" border="0">
<TR>
<TD style="WIDTH: 10px; HEIGHT: 8px"><FONT style="BACKGROUND-COLOR:
#ff0066"></FONT></TD>
<TD style="WIDTH: 99px; HEIGHT: 8px">
<asp:Label id="lblID" runat="server" Width="60px"
Font-Size="XX-Small" Font-Names="Arial,Verdana" Font-Bold="True">ID
</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 8px">
<asp:TextBox id="txtID" tabIndex="1" runat="server" Width="40px"
Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana" MaxLength="6"
ToolTip="Enter unique Employee ID"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 8px">&nbsp;</TD>
<TD style="WIDTH: 66px; HEIGHT: 8px"></TD>
<TD style="WIDTH: 180px; HEIGHT: 8px" vAlign="center">&nbsp;
</TD>
<TD style="WIDTH: 10px; HEIGHT: 8px">&nbsp;</TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 15px"><FONT
style="BACKGROUND-COLOR: #ff0066"></FONT></TD>
<TD style="WIDTH: 99px; HEIGHT: 15px">
<asp:Label id="lblFirstName" runat="server" Width="60px"
Font-Size="XX-Small" Font-Names="Arial,Verdana" Font-Bold="True">First Name
</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 15px">
<asp:TextBox id="txtFirstName" tabIndex="2" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="20"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 15px">&nbsp;</TD>
<TD style="WIDTH: 66px; HEIGHT: 15px">
<asp:Label id="lblSearchKeys" runat="server" Width="88px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Search
Keywords</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 15px">
<asp:TextBox id="txtSearchKeywords" tabIndex="13" runat="server"
Width="180px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="100" ToolTip="Enter keywords to use to help locate this
record"></asp:TextBox></TD>
<TD style="WIDTH: 10px; HEIGHT: 15px">&nbsp;</TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 18px">&nbsp;</TD>
<TD style="WIDTH: 99px; HEIGHT: 18px">
<asp:Label id="lblMiddleName" runat="server" Width="60px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Middle</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtMiddleName" tabIndex="3" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="20"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 18px">&nbsp;</TD>
<TD style="WIDTH: 66px; HEIGHT: 18px">&nbsp;</TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">&nbsp;</TD>
<TD style="WIDTH: 10px; HEIGHT: 18px">&nbsp;</TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 18px"><FONT
style="BACKGROUND-COLOR: #ff0066"></FONT></TD>
<TD style="WIDTH: 99px; HEIGHT: 18px">
<asp:Label id="lblLastName" runat="server" Width="55px"
Font-Size="XX-Small" Font-Names="Arial,Verdana" Font-Bold="True">Last
Name</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtLastName" tabIndex="4" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="25"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 66px; HEIGHT: 18px">
<asp:Label id="lblSpouse" runat="server" Width="65px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Spouse</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtSpouse" tabIndex="14" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="20"></asp:TextBox></TD>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 99px; HEIGHT: 18px">
<asp:Label id="lblEmail" runat="server" Width="82px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Work Email</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtEmail" tabIndex="5" runat="server"
Width="180px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="50"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 66px; HEIGHT: 18px">
<asp:Label id="lblAddress" runat="server" Width="65px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Address</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtAddress" tabIndex="15" runat="server"
Width="180px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="50"></asp:TextBox></TD>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 18px"><FONT
style="BACKGROUND-COLOR: #ff0066"></FONT></TD>
<TD style="WIDTH: 99px; HEIGHT: 18px">
<asp:Label id="lblBuilding" runat="server" Width="33px"
Font-Size="XX-Small" Font-Names="Arial,Verdana"
Font-Bold="True">Building</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:DropDownList id="dropBuilding" tabIndex="6" runat="server"
Width="180px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,verdana">
<asp:ListItem Value="- Select a Building" Selected="True">-
Select a Building</asp:ListItem>
<asp:ListItem
Value="Administration">Administration</asp:ListItem>
<asp:ListItem Value="Crawfordsville High School">Crawfordsville
High School</asp:ListItem>
<asp:ListItem Value="Tuttle Middle School">Tuttle Middle
School</asp:ListItem>
<asp:ListItem Value="Mollie B. Hoover Elementary School">Mollie
B. Hoover Elementary School</asp:ListItem>
<asp:ListItem Value="Laura G. Hose Elementary School">Laura G.
Hose Elementary School</asp:ListItem>
<asp:ListItem Value="Meredith Nicholson Elementary
School">Meredith Nicholson Elementary School</asp:ListItem>
<asp:ListItem Value="Willson Kindergarten Center">Willson
Kindergarten Center</asp:ListItem>
<asp:ListItem Value="John Beard Even Start - CARA Adult Ed.">John
Beard Even Start - CARA Adult Ed.</asp:ListItem>
<asp:ListItem Value="Support Services/Power &amp;
Transportation">Support Services/Power &amp; Transportation</asp:ListItem>
<asp:ListItem Value="West Central Special Services Co-op">West
Central Special Services Co-op</asp:ListItem>
<asp:ListItem Value="MOSS">MOSS</asp:ListItem>
</asp:DropDownList></TD>
<TD style="WIDTH: 15px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 66px; HEIGHT: 18px">
<asp:Label id="lblCity" runat="server" Width="65px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">City</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtCity" tabIndex="16" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="20"></asp:TextBox></TD>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 18px"><FONT
style="BACKGROUND-COLOR: #ff0066"></FONT></TD>
<TD style="WIDTH: 99px; HEIGHT: 18px">
<asp:Label id="lblDepartment" runat="server" Width="33px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Department</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtDepartment" tabIndex="7" runat="server"
Width="180px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="50"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 66px; HEIGHT: 18px">
<asp:Label id="lblState" runat="server" Width="65px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">State</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:DropDownList id="dropState" tabIndex="17" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,verdana">
<asp:ListItem Value="- Select a State" Selected="True">- Select a
State</asp:ListItem>
<asp:ListItem Value="AL">Alabama</asp:ListItem>
<asp:ListItem Value="AK">Alaska</asp:ListItem>
<asp:ListItem Value="AS">American Samoa</asp:ListItem>
<asp:ListItem Value="AZ">Arizona</asp:ListItem>
<asp:ListItem Value="AR">Arkansas</asp:ListItem>
<asp:ListItem Value="CA">California</asp:ListItem>
<asp:ListItem Value="CO">Colorado</asp:ListItem>
<asp:ListItem Value="CT">Connecticut</asp:ListItem>
<asp:ListItem Value="DE">Delaware</asp:ListItem>
<asp:ListItem Value="DC">District of Columbia</asp:ListItem>
<asp:ListItem Value="FL">Florida</asp:ListItem>
<asp:ListItem Value="GA">Georgia</asp:ListItem>
<asp:ListItem Value="GU">GUAM</asp:ListItem>
<asp:ListItem Value="HI">Hawaii</asp:ListItem>
<asp:ListItem Value="ID">Idaho</asp:ListItem>
<asp:ListItem Value="IL">Illinois</asp:ListItem>
<asp:ListItem Value="IN">Indiana</asp:ListItem>
<asp:ListItem Value="IA">Iowa</asp:ListItem>
<asp:ListItem Value="KS">Kansas</asp:ListItem>
<asp:ListItem Value="KY">Kentucky</asp:ListItem>
<asp:ListItem Value="LA">Louisiana</asp:ListItem>
<asp:ListItem Value="ME">Maine</asp:ListItem>
<asp:ListItem Value="MD">Maryland</asp:ListItem>
<asp:ListItem Value="MA">Massachusetts</asp:ListItem>
<asp:ListItem Value="MI">Michigan</asp:ListItem>
<asp:ListItem Value="MS">Mississippi</asp:ListItem>
<asp:ListItem Value="MO">Missouri</asp:ListItem>
<asp:ListItem Value="MT">Montana</asp:ListItem>
<asp:ListItem Value="NE">Nebraska</asp:ListItem>
<asp:ListItem Value="NV">Nevada</asp:ListItem>
<asp:ListItem Value="NH">New Hampshire</asp:ListItem>
<asp:ListItem Value="NJ">New Jersey</asp:ListItem>
<asp:ListItem Value="NM">New Mexico</asp:ListItem>
<asp:ListItem Value="NY">New York</asp:ListItem>
<asp:ListItem Value="NC">North Carolina</asp:ListItem>
<asp:ListItem Value="ND">North Dakota</asp:ListItem>
<asp:ListItem Value="OH">Ohio</asp:ListItem>
<asp:ListItem Value="OK">Oklahoma</asp:ListItem>
<asp:ListItem Value="OR">Oregon</asp:ListItem>
<asp:ListItem Value="PA">Pennsylvania</asp:ListItem>
<asp:ListItem Value="PR">Puerto Rico</asp:ListItem>
<asp:ListItem Value="RI">Rhode Island</asp:ListItem>
<asp:ListItem Value="SC">South Carolina</asp:ListItem>
<asp:ListItem Value="SD">South Dakota</asp:ListItem>
<asp:ListItem Value="TN">Tennessee</asp:ListItem>
<asp:ListItem Value="TX">Texas</asp:ListItem>
<asp:ListItem Value="UT">Utah</asp:ListItem>
<asp:ListItem Value="VT">Vermont</asp:ListItem>
<asp:ListItem Value="VA">Virginia</asp:ListItem>
<asp:ListItem Value="WA">Washington</asp:ListItem>
<asp:ListItem Value="WV">West Virginia</asp:ListItem>
<asp:ListItem Value="WI">Wisconsin</asp:ListItem>
</asp:DropDownList></TD>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 99px; HEIGHT: 18px">
<asp:Label id="lblTitle" runat="server" Width="33px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Title</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtTitle" tabIndex="8" runat="server"
Width="180px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="20"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 66px; HEIGHT: 18px">
<asp:Label id="lblZipCode" runat="server" Width="65px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Zip Code</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtZipCode" tabIndex="18" runat="server"
Width="50px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="10"></asp:TextBox></TD>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 99px; HEIGHT: 18px">
<asp:Label id="lblPhone" runat="server" Width="85px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Work Phone /
Ext.</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtPhone" tabIndex="9" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="14"></asp:TextBox>&nbsp;&nbsp;
<asp:TextBox id="txtExtension" tabIndex="10" runat="server"
Width="40px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="6"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 66px; HEIGHT: 18px">
<asp:Label id="lblHomePhone" runat="server" Width="65px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Home Phone</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 18px">
<asp:TextBox id="txtHomePhone" tabIndex="19" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="14"></asp:TextBox></TD>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 19px"></TD>
<TD style="WIDTH: 99px; HEIGHT: 19px">
<asp:Label id="lblFAX" runat="server" Width="88px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Work FAX</asp:Label></TD>
<TD style="WIDTH: 180px; HEIGHT: 19px">
<asp:TextBox id="txtFAX" tabIndex="11" runat="server"
Width="100px" Height="18px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="14"></asp:TextBox></TD>
<TD style="WIDTH: 15px; HEIGHT: 19px"></TD>
<TD style="WIDTH: 66px; HEIGHT: 19px"></TD>
<TD style="WIDTH: 180px; HEIGHT: 19px"></TD>
<TD style="WIDTH: 10px; HEIGHT: 19px"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
<TD style="WIDTH: 99px; HEIGHT: 18px" vAlign="top">
<asp:Label id="lblNotes" runat="server" Width="88px"
Font-Size="XX-Small" Font-Names="Arial,Verdana">Notes</asp:Label></TD>
<TD style="WIDTH: 441px; HEIGHT: 18px" colSpan="4">
<asp:TextBox id="txtNotes" tabIndex="12" runat="server"
Width="461px" Height="46px" Font-Size="XX-Small" Font-Names="Arial,Verdana"
MaxLength="250" Rows="2" TextMode="MultiLine"></asp:TextBox></TD>
<TD style="WIDTH: 10px; HEIGHT: 18px"></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD style="WIDTH: 64px; HEIGHT: 24px">
<asp:ImageButton id="ibtnNew" runat="server" Width="64px"
Height="24px" ImageUrl="/Images/DBActions/New.gif" BorderStyle="None"
BorderWidth="0px" ImageAlign="Top" ToolTip="Enter a new Directory
record"></asp:ImageButton></TD>
<TD style="WIDTH: 46px; HEIGHT: 24px">
<asp:ImageButton id="ibtnEdit" runat="server" Width="46px"
Height="24px" ImageUrl="/images/dbactions/edit.gif" BorderStyle="None"
BorderWidth="0px" ImageAlign="Top" ToolTip="Edit this
record"></asp:ImageButton></TD>
<TD style="WIDTH: 54px; HEIGHT: 24px">
<asp:ImageButton id="ibtnSave" runat="server" Width="54px"
Height="24px" ImageUrl="/images/dbactions/save.gif" BorderStyle="None"
BorderWidth="0px" ImageAlign="Top" ToolTip="Save changes to tthis
record"></asp:ImageButton></TD>
<TD style="WIDTH: 19px; HEIGHT: 24px">
<asp:Image id="imgSpacer1" runat="server" Width="19px" Height="24px"
ImageUrl="/images/dbactions/spacer1.gif" BorderStyle="None"
BorderWidth="0px" ImageAlign="Top"></asp:Image></TD>
<TD style="WIDTH: 57px; HEIGHT: 24px">
<asp:ImageButton id="ibtnDelete" runat="server" Width="57px"
Height="24px" ImageUrl="/images/dbactions/delete.gif" BorderStyle="None"
BorderWidth="0px" ImageAlign="Top" ToolTip="Delete the current
record"></asp:ImageButton></TD>
<TD style="WIDTH: 283px; HEIGHT: 24px">
<asp:Image id="imgSpacer2" runat="server" Width="283px" Height="24px"
ImageUrl="/images/dbactions/spacer2.gif" BorderStyle="None"
BorderWidth="0px" ImageAlign="Top"></asp:Image></TD>
<TD style="WIDTH: 77px; HEIGHT: 24px">
<asp:ImageButton id="ibtnCancel" runat="server" Width="77px"
Height="24px" ImageUrl="/images/dbactions/cancel.gif" BorderStyle="None"
BorderWidth="0px" ImageAlign="Top" ToolTip="Return to the Directory
List"></asp:ImageButton></TD>
</TR>
</TABLE>
</asp:panel><asp:label id="lblDebug" style="Z-INDEX: 102; LEFT: 134px;
POSITION: absolute; TOP: 422px" runat="server"
Width="593px">test</asp:label></form>
</body>
</HTML>


"Shane Bauer" <shane...@sourcecode-central.com> wrote in message
news:up#zHa1BCHA.2580@tkmsftngp05...

Nate

unread,
May 30, 2002, 12:00:55 PM5/30/02
to
If one of your user controls have a page_load event this would be causing
your page_load event in question to not fire. I could be wrong.. but i'm 99%
sure i've done the exact same thing.

Nate

"David C. Adler" <dca...@adlercomputing.com> wrote in message

news:uqvsyd#BCHA.1732@tkmsftngp02...

Shane Bauer

unread,
May 30, 2002, 2:48:58 PM5/30/02
to
David,

Try placing your <script> tag before any of the HTML is outputted. I
don't know if this will do anything for you but it is worth a shot.


"David C. Adler" <dca...@adlercomputing.com> wrote in message news:<uqvsyd#BCHA.1732@tkmsftngp02>...

Shane Bauer

unread,
May 30, 2002, 5:42:22 PM5/30/02
to
Good point
"Nate" <pr...@DONTSPAMcomdelight.net> wrote in message
news:e5b9nL$BCHA.2656@tkmsftngp05...

Nikolai Stoev

unread,
May 31, 2002, 3:21:28 AM5/31/02
to
Hi David,

Page_Load in your code is not wired to the load event. You have to:
1. First, change the Sub signature to:
    Sub Page_Load(s As Object, e As EventArgs)
2. Either set AutoEventWireUp to True in the @ Page directive, or change the above code to :
    Sub Page_Load(s As Object, e As EventArgs) Handles MyBase.Load
......................
Nikolai

David Adler

unread,
May 31, 2002, 9:25:34 AM5/31/02
to

Shane,

I tried putting the <script> section before any HTML and it did not make
a difference. Also, my User Control does not have a page_load event in
it.

I ended up using the Page_Load event in the aspx.vb file instead of
putting it in the aspx file. This worked OK.

David

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

0 new messages