Jag har en imagebutton som jag vill koppla ett ID till och tänkte då använda denna
[red]editButton.CommandArgument = Request.Params["id"].ToString();[/red]
För att sedan fånga upp värdet så här
[red]
Line 99: private void editButton_Click(object sender, System.Web.UI.ImageClickEventArgs e)
Line 100: {
Line 101: error.Text = ((LinkButton)sender).CommandArgument;
Line 102: }[/red]
Men jag får följande felmess
[red]
Specified cast is not valid.
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.InvalidCastException: Specified cast is not valid.[/red]
hur kan jag lösa detta?
mvh icaaq