L
Lloyd Sheen
I have a page just about ready to go and then I noticed all the databinding
on the page was happening twice (which really isn't nice).
I then created a small sample just to see what was going on. The page
contains just a dropdown which is databound to a SQLDatasource.
When this runs with a breakpoint on the "Dim i As Integer = 1" line it show
a breakpoint twice on the load.
Any ideas???
Lloyd Sheen
Page Source:
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="TestAccordian.aspx.vb" Inherits="TestAccordian" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Test Databinding Problems</title>
</head>
<body>
<form id="form1" runat="server">
<aspropDownList ID="GenreList" runat="server"
DataSourceID="SqlDataSource1"
DataTextField="Genre" DataValueField="Genre"
OnDataBound="GenreList_DataBound"
ToolTip="Choose only artists tagged with this genre"
Width="100px">
</aspropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:C:\DATABASE
FILES\MUSICINFODB.MDFConnectionString %>"
SelectCommand="SELECT [Genre] FROM [AllGenres]">
</asp:SqlDataSource>
</form>
</body>
</html>
Code Behind :
Partial Class TestAccordian
Inherits System.Web.UI.Page
Protected Sub GenreList_DataBound(ByVal sender As Object, ByVal e As
System.EventArgs) Handles GenreList.DataBound
Dim i As Integer = 1
End Sub
End Class
on the page was happening twice (which really isn't nice).
I then created a small sample just to see what was going on. The page
contains just a dropdown which is databound to a SQLDatasource.
When this runs with a breakpoint on the "Dim i As Integer = 1" line it show
a breakpoint twice on the load.
Any ideas???
Lloyd Sheen
Page Source:
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="TestAccordian.aspx.vb" Inherits="TestAccordian" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Test Databinding Problems</title>
</head>
<body>
<form id="form1" runat="server">
<aspropDownList ID="GenreList" runat="server"
DataSourceID="SqlDataSource1"
DataTextField="Genre" DataValueField="Genre"
OnDataBound="GenreList_DataBound"
ToolTip="Choose only artists tagged with this genre"
Width="100px">
</aspropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:C:\DATABASE
FILES\MUSICINFODB.MDFConnectionString %>"
SelectCommand="SELECT [Genre] FROM [AllGenres]">
</asp:SqlDataSource>
</form>
</body>
</html>
Code Behind :
Partial Class TestAccordian
Inherits System.Web.UI.Page
Protected Sub GenreList_DataBound(ByVal sender As Object, ByVal e As
System.EventArgs) Handles GenreList.DataBound
Dim i As Integer = 1
End Sub
End Class