I wrote a small c# winform app to migrate some user info from one DB to another. The application works jsut fine but when I use the web application now it bombs trying to read the users password with "Unable to validate data". This is from the Membership class.
In the exe's aspp.config I have the same machinekey as the web applications web.config so their shouldn't be an encryption issue. Does anyone have any suggestions?...
User Profile
Collapse
-
Acutally the SelectedIndex property in the SelectedIndexCh anged event isn't even the checkbox item that caused the event, it's just the first checkbox item that is selected.
In order to find the index of the actual checkbox item that caused the event to fire you either have to compare ViewState from the previous post, use javascript, or read the __EVENTTARGET string. -
Well do you know any other way to get the index of the checkbox that caused the postback in the checkboxlist?Leave a comment:
-
Rocky4Q started a topic how to determine the index that caused the selectedindexchanged event to firein ASP .NEThow to determine the index that caused the selectedindexchanged event to fire
I have seen a million forums ask this question. This is what has been working for me.
Code:protected void checkboxlist_SelectedIndexChanged(object sender, EventArgs e) { CheckBoxList list = (CheckBoxList)sender; string[] control = Request.Form.Get("__EVENTTARGET").Split('$'); int idx = control.Length - 1; string sel = list.Items[Int32.Parse(control[idx])].Value;
Last edited by Frinavale; Aug 4 '10, 01:34 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
No activity results to display
Show More
Leave a comment: