detect a postback from a radiobutton list

Posted by user228777 on Stack Overflow See other posts from Stack Overflow or by user228777
Published on 2010-05-13T14:36:22Z Indexed on 2010/05/13 14:44 UTC
Read the original article Hit count: 142

Filed under:

I am trying to detect a postback from Radiobutton list. I am trying to use following code: If Page.Request.Params.Get("__EVENTTARGET") = optDownload.UniqueID.ToString Then

But Page.Request.Params.Get("__EVENTTARGET") returns "ctl00$ContentPlaceHolder1$pnlBarAccounts$i0$i2$i0$CHChecking$Acct1$optDownload$4" And = optDownload.UniqueID.ToString returns "ctl00$ContentPlaceHolder1$pnlBarAccounts$i0$i2$i0$CHChecking$Acct1$optDownload" There is a difference in last 2 characters, how do I detect a postback from Radiobutton list?

© Stack Overflow or respective owner

Related posts about .NET