Sunday, 15 January 2012

vb.net - Why is a button contained in an asp.net repeater control embedded in an ASCX user control throwing an exception when clicked? -


I am creating an asp.net application behind code with VB.Net.

I is an asp :: repeater that is in a user control (ASCX) contained in a page (ASPX). Repeater has a button when I click on the button, when the verification error is thrown.

I downloaded the C version and it works as an advertisement.

The purpose of customer's needs, we are trying to rewrite the control in VB.Net. Tabs in this example are wrapped in ASP: Repeater Control We have gone on an issue where the onetime does not remove the common handler (on the server side).

Test Page

  & lt; % @ Page title = "" language = "vb" AutoEventWireup = "false" masterpagefile = "~ / Site.master" CodeBehind = "test3m.aspx.vb" Inherits = "TestTabbedGridView. Test3m" EnableEventValidation = "false"%> ; & Lt;% @ Register Src = "~ / UserControls / DataSetGrid.ascx" tagname = "dataset grid" tagfix = "ucDataSetGrid"% & gt; & Lt; Asp: Content ID = "Content1" content placeholder id = "head content" run = "server" & gt; & Lt; / ASP: Content & gt; & Lt; Asp: Content ID = "Content2" content placeholder id = "main content" run = "server" & gt; & Lt; UcDataSetGrid: Dataset grid runat = "server" width = "600px" height = "310px" id = "datagrid" /> & Lt; / ASP: Content & gt;  

Dataset Grid User Control:

  & lt;% @ control language = "vb" CodeBehind = "DataSetGrid.ascx. Vb "Inheritance =" TestTride Grid View. Dataset Grid "%" & Lt;% @ Register Src = "~ / UserControls / TabStrip.ascx" tag name = "tabstrip" tagfix = "ucTabStrip"%> & Lt; Table id = "__ theTable" runat = "server" bgcolor = "ivory" range = "1" cellpadding = "0" cell field = "0" & ​​gt; & Lt; TR & gt; & Lt; Td valign = "top" & gt; & Lt; UcTabStrip: Tabstrip ID = "ts" runat = "server" selected boxer = "cyan" on-changelog = "selection switch" /> & Lt; ASP: DataGrid ID = "__ The Grid" Runat = "Server" Allow paging = "true" cellpadding = "2" cell spacing = "0" font-name = "vardana" font-size = "8" gridline = " None By changing the "On item command =" item command "onpage index =" Page index checked "on-selected index change =" selected index change "pages =" 12 "width =" 100% "& gt; & Lt; PagerStyle font-name = "web-dix" font-size = "150%" next page text = "4" position = "top" prefix text = "3" /> & Lt; Selected ITemStyle BackColor = "yellow" / & gt; & Lt; AlternatingItemStyle BackColor = "ivory" /> & Lt; Item System BackColor = "# eeeeee" /> & Lt; / ASP: Data Grid & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;  Tabstrip user control:   
  & lt;% @ Control language = "vb" CodeBehind = "TabStrip.ascx. Vb "Inheritance =" TestTabrid Grid View Tabstrip "%" & Lt; Div class = "lightbluebackground" & gt; & Lt; Asp: Repeater id = "rpt" runat = "server" onItemCommand = "item commandfard" & gt; & Lt; HeaderTemplate & gt; & Lt; Table cellpadding = "0" selection = "0" range = "0" & ​​gt; & Lt; TR & gt; & Lt; / HeaderTemplate & gt; & Lt; ItemTemplate & gt; & Lt; TD & gt; & Lt; ASP: Button reason validity = "false" run = "server" id = "btnteb" text = "& lt;% # container.datetime%>" CommandName = "CMDSELinkTab" Borderwidth = "1PX" borderstyle = "solid" /> & Lt; / TD & gt; & Lt; / ItemTemplate & gt; & Lt; FooterTemplate & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / FooterTemplate & gt; & Lt; / ASP: Repeater & gt; & Lt; / Div & gt;  

Is there a difference between espaƱol C # and VBnet which I should know? Does it somehow include the viewstate?

Can someone help me point in the right direction or help to know why those incidents have not been removed?

Thanks, John B


No comments:

Post a Comment