Groups | Blog | Home
all groups > asp.net announcements > august 2004 >

asp.net announcements : OnItemCommand not working



chitien chiu via .NET 247
8/4/2004 5:52:12 AM
(Type your message here)

Hi,

I had a page with OnItemCommand working. Later I created a new page from which I passed a session variable and redirected to the orignal page.

FullName = NameID.SelectedItem.Value
Session("FullName") = FullName
Response.Redirect("WebDataView2.aspx")

Now, the OnItemCommand is not working on the orignal page. When I clicked the buttom, it didn't even go to the sub routine. What could go wrong? Following is partial codes:

<asp:datagrid id="DataGridDisplay" runat="server" OnItemCommand="EditRecord"
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<br>
</HeaderTemplate>
<ItemTemplate>
<asp:Button Text="Detail" runat="server" ID="Button4" Width="50px" />
</ItemTemplate>
</asp:TemplateColumn>
</Columns>

Sub EditRecord(ByVal Src As Object, ByVal Args As DataGridCommandEventArgs) Handles DataGridDisplay.ItemCommand
......


Thanks,

--------------------------------
From: chitien chiu

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

Raghavendra T V
9/3/2004 10:57:56 AM
Hi Chitien,

Check whether the Delegate is existing for the OnItemCommand in the
intialise() method.

Thanks
Raghavendra
[quoted text, click to view]
the buttom, it didn't even go to the sub routine. What could go wrong?
Following is partial codes:
[quoted text, click to view]

AddThis Social Bookmark Button