Hallo allemaal,
Ik heb het volgende gemaakt:
Een repeater met daarin een imagebutton. De properties van de imagebutton CommandName en CommandArgument zijn gevuld.
In de .vb file:
Maar zodra ik op de imagebutton klik, krijg ik de volgende code:
Ook een break op de sub heeft geen zin, want de imagebutton komt nooit bij die sub, het zit daarvoor al.
Als ik de imagebutton vervang met een button, dan doet ie het wel :shocked:
Heeft iemand enig idee wat het probleem kan zijn?
Alvast bedankt!
Ik heb het volgende gemaakt:
Een repeater met daarin een imagebutton. De properties van de imagebutton CommandName en CommandArgument zijn gevuld.
In de .vb file:
Code:
Protected Sub RP_ItemCommand(ByVal source As Object, ByVal e As RepeaterCommandEventArgs) Handles RP.ItemCommand
If e.CommandName.ToString() = "add" Then
... rest van de code
End If
End Sub
Maar zodra ik op de imagebutton klik, krijg ik de volgende code:
Code:
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7469351
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) +163
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +14
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +693
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743
Ook een break op de sub heeft geen zin, want de imagebutton komt nooit bij die sub, het zit daarvoor al.
Als ik de imagebutton vervang met een button, dan doet ie het wel :shocked:
Heeft iemand enig idee wat het probleem kan zijn?
Alvast bedankt!