Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Totally confused (http://www.velocityreviews.com/forums/t596396-totally-confused.html)

Lloyd Sheen 03-06-2008 02:46 AM

Totally confused
 
Ok I have a web control which is used to input search terms. It works
really well on one page.

Now I need nearly the same functionallity on another page and I take the
pieces and move them to the new page (no web control). I have a button with
a click function which populates a repeater. On the first click of the
button it goes to the click handler and all is well. On the second click it
goes directly to the ItemCreated handler. Since the DataSource has not been
created of course this does not work.

Of course in the call stack there is nothing I can identify as to the reason
for the repeater to attempt the ItemCreated since it did not go thru my code
to get a new datasource.

I have tried all sorts of combinations of AutoEventWireup on the @Page
directive but nothing works on the second occurence.

Any ideas? If you want I can post code as well.

Lloyd Sheen


Lloyd Sheen 03-06-2008 02:55 AM

Re: Totally confused
 

"Lloyd Sheen" <a@b.c> wrote in message
news:OhK%23GRzfIHA.2000@TK2MSFTNGP03.phx.gbl...
> Ok I have a web control which is used to input search terms. It works
> really well on one page.
>
> Now I need nearly the same functionallity on another page and I take the
> pieces and move them to the new page (no web control). I have a button
> with a click function which populates a repeater. On the first click of
> the button it goes to the click handler and all is well. On the second
> click it goes directly to the ItemCreated handler. Since the DataSource
> has not been created of course this does not work.
>
> Of course in the call stack there is nothing I can identify as to the
> reason for the repeater to attempt the ItemCreated since it did not go
> thru my code to get a new datasource.
>
> I have tried all sorts of combinations of AutoEventWireup on the @Page
> directive but nothing works on the second occurence.
>
> Any ideas? If you want I can post code as well.
>
> Lloyd Sheen


Other detail:

Code in button click is:

Dim d As New DAL
Dim artistName As String
artistName = ArtistSearchText.Text

Me.Repeater3.DataSourceID = Nothing
Me.Repeater3.DataSource = d.GetAlbumList(artistName)
Me.Repeater3.DataBind()

ResultsUpdatePanel.Update()


If I comment out the DataBind on all subsequent button clicks it will go to
the click handler. Put the databind in and it no longer goes to the
handler.

Very confusing???

Lloyd Sheen


Lloyd Sheen 03-06-2008 03:00 AM

Re: Totally confused
 

"Lloyd Sheen" <a@b.c> wrote in message
news:%23CdoQWzfIHA.3632@TK2MSFTNGP06.phx.gbl...
>
> "Lloyd Sheen" <a@b.c> wrote in message
> news:OhK%23GRzfIHA.2000@TK2MSFTNGP03.phx.gbl...
>> Ok I have a web control which is used to input search terms. It works
>> really well on one page.
>>
>> Now I need nearly the same functionallity on another page and I take the
>> pieces and move them to the new page (no web control). I have a button
>> with a click function which populates a repeater. On the first click of
>> the button it goes to the click handler and all is well. On the second
>> click it goes directly to the ItemCreated handler. Since the DataSource
>> has not been created of course this does not work.
>>
>> Of course in the call stack there is nothing I can identify as to the
>> reason for the repeater to attempt the ItemCreated since it did not go
>> thru my code to get a new datasource.
>>
>> I have tried all sorts of combinations of AutoEventWireup on the @Page
>> directive but nothing works on the second occurence.
>>
>> Any ideas? If you want I can post code as well.
>>
>> Lloyd Sheen

>
> Other detail:
>
> Code in button click is:
>
> Dim d As New DAL
> Dim artistName As String
> artistName = ArtistSearchText.Text
>
> Me.Repeater3.DataSourceID = Nothing
> Me.Repeater3.DataSource = d.GetAlbumList(artistName)
> Me.Repeater3.DataBind()
>
> ResultsUpdatePanel.Update()
>
>
> If I comment out the DataBind on all subsequent button clicks it will go
> to the click handler. Put the databind in and it no longer goes to the
> handler.
>
> Very confusing???
>
> Lloyd Sheen


And still more:

I added a page load handler (does nothing). On load of app it is called.
On first click it is called. After that who knows what is happening??

Certainly not me and certainly not ASP.NET.

Lloyd Sheen


Lloyd Sheen 03-06-2008 04:10 AM

Re: Totally confused
 

"Lloyd Sheen" <a@b.c> wrote in message
news:udMg3YzfIHA.4260@TK2MSFTNGP05.phx.gbl...
>
> "Lloyd Sheen" <a@b.c> wrote in message
> news:%23CdoQWzfIHA.3632@TK2MSFTNGP06.phx.gbl...
>>
>> "Lloyd Sheen" <a@b.c> wrote in message
>> news:OhK%23GRzfIHA.2000@TK2MSFTNGP03.phx.gbl...
>>> Ok I have a web control which is used to input search terms. It works
>>> really well on one page.
>>>
>>> Now I need nearly the same functionallity on another page and I take the
>>> pieces and move them to the new page (no web control). I have a button
>>> with a click function which populates a repeater. On the first click of
>>> the button it goes to the click handler and all is well. On the second
>>> click it goes directly to the ItemCreated handler. Since the DataSource
>>> has not been created of course this does not work.
>>>
>>> Of course in the call stack there is nothing I can identify as to the
>>> reason for the repeater to attempt the ItemCreated since it did not go
>>> thru my code to get a new datasource.
>>>
>>> I have tried all sorts of combinations of AutoEventWireup on the @Page
>>> directive but nothing works on the second occurence.
>>>
>>> Any ideas? If you want I can post code as well.
>>>
>>> Lloyd Sheen

>>
>> Other detail:
>>
>> Code in button click is:
>>
>> Dim d As New DAL
>> Dim artistName As String
>> artistName = ArtistSearchText.Text
>>
>> Me.Repeater3.DataSourceID = Nothing
>> Me.Repeater3.DataSource = d.GetAlbumList(artistName)
>> Me.Repeater3.DataBind()
>>
>> ResultsUpdatePanel.Update()
>>
>>
>> If I comment out the DataBind on all subsequent button clicks it will go
>> to the click handler. Put the databind in and it no longer goes to the
>> handler.
>>
>> Very confusing???
>>
>> Lloyd Sheen

>
> And still more:
>
> I added a page load handler (does nothing). On load of app it is called.
> On first click it is called. After that who knows what is happening??
>
> Certainly not me and certainly not ASP.NET.
>
> Lloyd Sheen


Ok I have taken out all Ajax (toolkit) code and I now have a button which
when clicked will only work once.

Here is full code:

ASPX:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ShowSongs.aspx.vb"
Inherits="ShowSongs" %>
<!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>Untitled Page</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<br />
<table width="100%">
<tr>
<td >
<table>
<tr>
<td id="ArtistTD" >
<asp:Label ID="Label2" runat="server"
CssClass="SearchTitles" Text="Artist :"></asp:Label>
<asp:TextBox ID="ArtistSearchText" runat="server"
BackColor="#C0FFFF"></asp:TextBox>
<asp:ImageButton ID="SearchByArtist" runat="server"
ImageAlign="Middle"
ImageUrl="~/Images/find.ico"
OnClick="SearchByArtist_Click"
Width="32px" />
</td>
</tr>
</table>

</td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;<asp:Repeater ID="Repeater3" runat="server">
<HeaderTemplate>
<asp:Label ID="ArtistLabel" runat="server"
Text="Label"></asp:Label>
<br />
</HeaderTemplate>
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" Height="24px"
Width="24px"
runat="server" />
<asp:Label ID="CDTitle" runat="server"
Text="Label"></asp:Label>
<br />
</ItemTemplate>
</asp:Repeater>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>


..VB codebehind

Option Strict On
Option Explicit On

Imports System.IO
Imports MusicSiteControls
Imports System.Collections.Generic

Partial Class ShowSongs
Inherits System.Web.UI.Page

Protected Sub SearchByArtist_Click(ByVal sender As Object, ByVal e As
System.Web.UI.ImageClickEventArgs)
Dim d As New DAL
Dim artistName As String
artistName = ArtistSearchText.Text
Me.Repeater3.DataSourceID = Nothing
Me.Repeater3.DataSource = d.GetAlbumList(artistName)
Me.Repeater3.DataBind()
End Sub

Protected Sub Repeater3_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.RepeaterItemEventArgs) Handles
Repeater3.ItemCreated
Dim ArtistLabel As Label
Dim CDTit As Label
Dim ib As ImageButton
Dim ds As CD
Select Case e.Item.ItemType
Case ListItemType.Header
ArtistLabel = CType(e.Item.FindControl("ArtistLabel"),
Label)
ArtistLabel.Text = ArtistSearchText.Text
Case ListItemType.AlternatingItem, ListItemType.Item
ds = CType(e.Item.DataItem, CD)
ib = DirectCast(e.Item.FindControl("ImageButton1"),
ImageButton)
CDTit = CType(e.Item.FindControl("CDTitle"), Label)
CDTit.Text = ds.Name
Dim url As String
url = "~\DynamicImage.aspx?ImageFolder=" +
ds.FolderNumber.ToString + "&ImageText=" + "1"
ib.ImageUrl = url
End Select
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim i As Integer = 1
End Sub
End Class


HELP PLEASE!

This is just a page with a button and a repeater. How can this possibly go
so wrong??

Lloyd Sheen


John Kotuby 03-28-2008 09:01 PM

Re: Totally confused
 
Hi Lloyd,
I'm assuming you found an answer to your problem already and just didn't
bother to post the solution, which I would be very interested in seeing.

My first thought on reading your posts was that the problems were deriving
from the use of an UpdatePanel. I've had some strange things happen with
UpdatePanels when the templates weren't defined such that they each contain
an entire Table (instead of just rows within a table).

Also the Page_Load should Not fire after the inital load of the page,
because the actual page persists in the browser during an asynch callback.

Also I was wondering if you were including the Button (actually an
ImageButton) as a child control in the update panel or at least defining it
as a Trigger for the panel.

But all those ideas went south when you said that you removed the "AJAX"
stuff.

I'm guessing you eventually re-wrote the page from scratch and got it to
finally work.

Cheers...

"Lloyd Sheen" <a@b.c> wrote in message
news:OXOJQA0fIHA.6136@TK2MSFTNGP03.phx.gbl...
>
> "Lloyd Sheen" <a@b.c> wrote in message
> news:udMg3YzfIHA.4260@TK2MSFTNGP05.phx.gbl...
>>
>> "Lloyd Sheen" <a@b.c> wrote in message
>> news:%23CdoQWzfIHA.3632@TK2MSFTNGP06.phx.gbl...
>>>
>>> "Lloyd Sheen" <a@b.c> wrote in message
>>> news:OhK%23GRzfIHA.2000@TK2MSFTNGP03.phx.gbl...
>>>> Ok I have a web control which is used to input search terms. It works
>>>> really well on one page.
>>>>
>>>> Now I need nearly the same functionallity on another page and I take
>>>> the pieces and move them to the new page (no web control). I have a
>>>> button with a click function which populates a repeater. On the first
>>>> click of the button it goes to the click handler and all is well. On
>>>> the second click it goes directly to the ItemCreated handler. Since
>>>> the DataSource has not been created of course this does not work.
>>>>
>>>> Of course in the call stack there is nothing I can identify as to the
>>>> reason for the repeater to attempt the ItemCreated since it did not go
>>>> thru my code to get a new datasource.
>>>>
>>>> I have tried all sorts of combinations of AutoEventWireup on the @Page
>>>> directive but nothing works on the second occurence.
>>>>
>>>> Any ideas? If you want I can post code as well.
>>>>
>>>> Lloyd Sheen
>>>
>>> Other detail:
>>>
>>> Code in button click is:
>>>
>>> Dim d As New DAL
>>> Dim artistName As String
>>> artistName = ArtistSearchText.Text
>>>
>>> Me.Repeater3.DataSourceID = Nothing
>>> Me.Repeater3.DataSource = d.GetAlbumList(artistName)
>>> Me.Repeater3.DataBind()
>>>
>>> ResultsUpdatePanel.Update()
>>>
>>>
>>> If I comment out the DataBind on all subsequent button clicks it will go
>>> to the click handler. Put the databind in and it no longer goes to the
>>> handler.
>>>
>>> Very confusing???
>>>
>>> Lloyd Sheen

>>
>> And still more:
>>
>> I added a page load handler (does nothing). On load of app it is called.
>> On first click it is called. After that who knows what is happening??
>>
>> Certainly not me and certainly not ASP.NET.
>>
>> Lloyd Sheen

>
> Ok I have taken out all Ajax (toolkit) code and I now have a button which
> when clicked will only work once.
>
> Here is full code:
>
> ASPX:
>
> <%@ Page Language="VB" AutoEventWireup="false"
> CodeFile="ShowSongs.aspx.vb" Inherits="ShowSongs" %>
> <!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>Untitled Page</title>
> <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> <br />
> <table width="100%">
> <tr>
> <td >
> <table>
> <tr>
> <td id="ArtistTD" >
> <asp:Label ID="Label2" runat="server"
> CssClass="SearchTitles" Text="Artist :"></asp:Label>
> <asp:TextBox ID="ArtistSearchText" runat="server"
> BackColor="#C0FFFF"></asp:TextBox>
> <asp:ImageButton ID="SearchByArtist" runat="server"
> ImageAlign="Middle"
> ImageUrl="~/Images/find.ico"
> OnClick="SearchByArtist_Click"
> Width="32px" />
> </td>
> </tr>
> </table>
>
> </td>
> <td style="width: 100px">
> </td>
> </tr>
> <tr>
> <td colspan="2">
> &nbsp;<asp:Repeater ID="Repeater3" runat="server">
> <HeaderTemplate>
> <asp:Label ID="ArtistLabel" runat="server"
> Text="Label"></asp:Label>
> <br />
> </HeaderTemplate>
> <ItemTemplate>
> <asp:ImageButton ID="ImageButton1" Height="24px"
> Width="24px"
> runat="server" />
> <asp:Label ID="CDTitle" runat="server"
> Text="Label"></asp:Label>
> <br />
> </ItemTemplate>
> </asp:Repeater>
> </td>
> </tr>
> </table>
> </div>
> </form>
> </body>
> </html>
>
>
> .VB codebehind
>
> Option Strict On
> Option Explicit On
>
> Imports System.IO
> Imports MusicSiteControls
> Imports System.Collections.Generic
>
> Partial Class ShowSongs
> Inherits System.Web.UI.Page
>
> Protected Sub SearchByArtist_Click(ByVal sender As Object, ByVal e As
> System.Web.UI.ImageClickEventArgs)
> Dim d As New DAL
> Dim artistName As String
> artistName = ArtistSearchText.Text
> Me.Repeater3.DataSourceID = Nothing
> Me.Repeater3.DataSource = d.GetAlbumList(artistName)
> Me.Repeater3.DataBind()
> End Sub
>
> Protected Sub Repeater3_ItemCreated(ByVal sender As Object, ByVal e As
> System.Web.UI.WebControls.RepeaterItemEventArgs) Handles
> Repeater3.ItemCreated
> Dim ArtistLabel As Label
> Dim CDTit As Label
> Dim ib As ImageButton
> Dim ds As CD
> Select Case e.Item.ItemType
> Case ListItemType.Header
> ArtistLabel = CType(e.Item.FindControl("ArtistLabel"),
> Label)
> ArtistLabel.Text = ArtistSearchText.Text
> Case ListItemType.AlternatingItem, ListItemType.Item
> ds = CType(e.Item.DataItem, CD)
> ib = DirectCast(e.Item.FindControl("ImageButton1"),
> ImageButton)
> CDTit = CType(e.Item.FindControl("CDTitle"), Label)
> CDTit.Text = ds.Name
> Dim url As String
> url = "~\DynamicImage.aspx?ImageFolder=" +
> ds.FolderNumber.ToString + "&ImageText=" + "1"
> ib.ImageUrl = url
> End Select
> End Sub
>
> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Me.Load
> Dim i As Integer = 1
> End Sub
> End Class
>
>
> HELP PLEASE!
>
> This is just a page with a button and a repeater. How can this possibly
> go so wrong??
>
> Lloyd Sheen




Lloyd Sheen 03-28-2008 11:54 PM

Re: Totally confused
 

"John Kotuby" <jkotuby75@comcast.net> wrote in message
news:e3aFNbRkIHA.484@TK2MSFTNGP06.phx.gbl...
> Hi Lloyd,
> I'm assuming you found an answer to your problem already and just didn't
> bother to post the solution, which I would be very interested in seeing.
>
> My first thought on reading your posts was that the problems were deriving
> from the use of an UpdatePanel. I've had some strange things happen with
> UpdatePanels when the templates weren't defined such that they each
> contain an entire Table (instead of just rows within a table).
>
> Also the Page_Load should Not fire after the inital load of the page,
> because the actual page persists in the browser during an asynch callback.
>
> Also I was wondering if you were including the Button (actually an
> ImageButton) as a child control in the update panel or at least defining
> it as a Trigger for the panel.
>
> But all those ideas went south when you said that you removed the "AJAX"
> stuff.
>
> I'm guessing you eventually re-wrote the page from scratch and got it to
> finally work.
>
> Cheers...
>
> "Lloyd Sheen" <a@b.c> wrote in message
> news:OXOJQA0fIHA.6136@TK2MSFTNGP03.phx.gbl...
>>
>> "Lloyd Sheen" <a@b.c> wrote in message
>> news:udMg3YzfIHA.4260@TK2MSFTNGP05.phx.gbl...
>>>
>>> "Lloyd Sheen" <a@b.c> wrote in message
>>> news:%23CdoQWzfIHA.3632@TK2MSFTNGP06.phx.gbl...
>>>>
>>>> "Lloyd Sheen" <a@b.c> wrote in message
>>>> news:OhK%23GRzfIHA.2000@TK2MSFTNGP03.phx.gbl...
>>>>> Ok I have a web control which is used to input search terms. It works
>>>>> really well on one page.
>>>>>
>>>>> Now I need nearly the same functionallity on another page and I take
>>>>> the pieces and move them to the new page (no web control). I have a
>>>>> button with a click function which populates a repeater. On the first
>>>>> click of the button it goes to the click handler and all is well. On
>>>>> the second click it goes directly to the ItemCreated handler. Since
>>>>> the DataSource has not been created of course this does not work.
>>>>>
>>>>> Of course in the call stack there is nothing I can identify as to the
>>>>> reason for the repeater to attempt the ItemCreated since it did not go
>>>>> thru my code to get a new datasource.
>>>>>
>>>>> I have tried all sorts of combinations of AutoEventWireup on the @Page
>>>>> directive but nothing works on the second occurence.
>>>>>
>>>>> Any ideas? If you want I can post code as well.
>>>>>
>>>>> Lloyd Sheen
>>>>
>>>> Other detail:
>>>>
>>>> Code in button click is:
>>>>
>>>> Dim d As New DAL
>>>> Dim artistName As String
>>>> artistName = ArtistSearchText.Text
>>>>
>>>> Me.Repeater3.DataSourceID = Nothing
>>>> Me.Repeater3.DataSource = d.GetAlbumList(artistName)
>>>> Me.Repeater3.DataBind()
>>>>
>>>> ResultsUpdatePanel.Update()
>>>>
>>>>
>>>> If I comment out the DataBind on all subsequent button clicks it will
>>>> go to the click handler. Put the databind in and it no longer goes to
>>>> the handler.
>>>>
>>>> Very confusing???
>>>>
>>>> Lloyd Sheen
>>>
>>> And still more:
>>>
>>> I added a page load handler (does nothing). On load of app it is
>>> called. On first click it is called. After that who knows what is
>>> happening??
>>>
>>> Certainly not me and certainly not ASP.NET.
>>>
>>> Lloyd Sheen

>>
>> Ok I have taken out all Ajax (toolkit) code and I now have a button which
>> when clicked will only work once.
>>
>> Here is full code:
>>
>> ASPX:
>>
>> <%@ Page Language="VB" AutoEventWireup="false"
>> CodeFile="ShowSongs.aspx.vb" Inherits="ShowSongs" %>
>> <!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>Untitled Page</title>
>> <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
>> </head>
>> <body>
>> <form id="form1" runat="server">
>> <div>
>> <br />
>> <table width="100%">
>> <tr>
>> <td >
>> <table>
>> <tr>
>> <td id="ArtistTD" >
>> <asp:Label ID="Label2" runat="server"
>> CssClass="SearchTitles" Text="Artist :"></asp:Label>
>> <asp:TextBox ID="ArtistSearchText" runat="server"
>> BackColor="#C0FFFF"></asp:TextBox>
>> <asp:ImageButton ID="SearchByArtist" runat="server"
>> ImageAlign="Middle"
>> ImageUrl="~/Images/find.ico"
>> OnClick="SearchByArtist_Click"
>> Width="32px" />
>> </td>
>> </tr>
>> </table>
>>
>> </td>
>> <td style="width: 100px">
>> </td>
>> </tr>
>> <tr>
>> <td colspan="2">
>> &nbsp;<asp:Repeater ID="Repeater3" runat="server">
>> <HeaderTemplate>
>> <asp:Label ID="ArtistLabel" runat="server"
>> Text="Label"></asp:Label>
>> <br />
>> </HeaderTemplate>
>> <ItemTemplate>
>> <asp:ImageButton ID="ImageButton1" Height="24px"
>> Width="24px"
>> runat="server" />
>> <asp:Label ID="CDTitle" runat="server"
>> Text="Label"></asp:Label>
>> <br />
>> </ItemTemplate>
>> </asp:Repeater>
>> </td>
>> </tr>
>> </table>
>> </div>
>> </form>
>> </body>
>> </html>
>>
>>
>> .VB codebehind
>>
>> Option Strict On
>> Option Explicit On
>>
>> Imports System.IO
>> Imports MusicSiteControls
>> Imports System.Collections.Generic
>>
>> Partial Class ShowSongs
>> Inherits System.Web.UI.Page
>>
>> Protected Sub SearchByArtist_Click(ByVal sender As Object, ByVal e As
>> System.Web.UI.ImageClickEventArgs)
>> Dim d As New DAL
>> Dim artistName As String
>> artistName = ArtistSearchText.Text
>> Me.Repeater3.DataSourceID = Nothing
>> Me.Repeater3.DataSource = d.GetAlbumList(artistName)
>> Me.Repeater3.DataBind()
>> End Sub
>>
>> Protected Sub Repeater3_ItemCreated(ByVal sender As Object, ByVal e As
>> System.Web.UI.WebControls.RepeaterItemEventArgs) Handles
>> Repeater3.ItemCreated
>> Dim ArtistLabel As Label
>> Dim CDTit As Label
>> Dim ib As ImageButton
>> Dim ds As CD
>> Select Case e.Item.ItemType
>> Case ListItemType.Header
>> ArtistLabel = CType(e.Item.FindControl("ArtistLabel"),
>> Label)
>> ArtistLabel.Text = ArtistSearchText.Text
>> Case ListItemType.AlternatingItem, ListItemType.Item
>> ds = CType(e.Item.DataItem, CD)
>> ib = DirectCast(e.Item.FindControl("ImageButton1"),
>> ImageButton)
>> CDTit = CType(e.Item.FindControl("CDTitle"), Label)
>> CDTit.Text = ds.Name
>> Dim url As String
>> url = "~\DynamicImage.aspx?ImageFolder=" +
>> ds.FolderNumber.ToString + "&ImageText=" + "1"
>> ib.ImageUrl = url
>> End Select
>> End Sub
>>
>> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
>> System.EventArgs) Handles Me.Load
>> Dim i As Integer = 1
>> End Sub
>> End Class
>>
>>
>> HELP PLEASE!
>>
>> This is just a page with a button and a repeater. How can this possibly
>> go so wrong??
>>
>> Lloyd Sheen

>
>


I did post it. But what was wrong ended up being that I was handling the
ItemCreated rather than the ItemDataBound. I was creating the page by copy
pasting code but creating the events with IDE.

Still a very strange happening when something was wrong.

LS



All times are GMT. The time now is 09:34 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.