User Profile

Collapse

Profile Sidebar

Collapse
Rocky4Q
Rocky4Q
Last Activity: Oct 21 '10, 03:21 PM
Joined: Aug 4 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MachineKeys in web.config and app.config "Unable to validate data"

    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?...
    See more | Go to post
    Last edited by Rocky4Q; Oct 20 '10, 09:07 PM. Reason: Added stacktrace info, Added *.config info

  • 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.
    See more | Go to post

    Leave a comment:


  • Well do you know any other way to get the index of the checkbox that caused the postback in the checkboxlist?
    See more | Go to post

    Leave a comment:


  • how 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;
    ...
    See more | Go to post
    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
Working...