Results 1 to 3 of 3

Thread: AJAX and .NET Help!!

  1. #1
    Join Date
    Jul 2004
    Posts
    153
    Rep Power
    0

    Default AJAX and .NET Help!!

    Ok guys have a problem.
    I'm using VS.NET2003..so don't make reference to atlas

    Ok i've built a custom scheduler which allows the user to click a time slot and assign someone to that slot...something like google.calendar..

    Mine however have some designed limitation u can double book...and the assignees are predefined....

    so this is it.... i have a list of assignees in the database...the ajax calls the remote page - which has ddl - and populates the dropdown list with unassigned candidates...and then displays it on the scheduler page... u assign the person by clicking a button which makes another AJAX call..that part works fine...
    now when u click another slot to assign another candidate the one which has been assigned is still in the list... the queries are all right and it works perfectly in FF so its not a coding issue.... it seems that the page being called is not requesting data from the server...

    Eg. if i click/assign one applicant, then visit the remote page using the url directly...i see original data...if i then refresh the browser it makes the request and populate the ddl with updated info....I've tried including a random querystring variable to the url...but still nothing...I'm also thinking its related to view state...need to suggessions...

  2. #2
    Join Date
    Dec 2002
    Posts
    500
    Rep Power
    0

    Default

    Quote Originally Posted by codecarnage View Post
    candidate the one which has been assigned is still in the list
    you have to repopulate the list with users not assigned yourself, i dont think it would do that for you. or if you know DOM, you can use removeNode on the child node (option) that had been assigned.

    if you store the collection that the ddl is populated from in the Session, then also remove the entry from that collection in your Ajax call. then set a flag that the collection was changed like...Session("UserAssignedFromList") = True. check Session("UserAssignedFromList") = True in Page_Load if it true then DataBind again or whatever custom ddl Loading Procedure you used.
    Last edited by icymint3; Nov 30, 2006 at 05:31 PM.
    Cultured in Aggression and Koding like a Warrior!!
    “Common sense is instinct. Enough of it is genius.” - George Bernard Shaw.
    "The significant problems we face cannot be solved by the same level of thinking that created them." - Albert Einstein

  3. #3
    Join Date
    Jul 2004
    Posts
    153
    Rep Power
    0

    Default

    mint...thanks 4 ur suggessions..i have already coded a work-around, with just one AJAX call to do the saving...so i forgot about populating the ddl using ajax - used DOM and server code instead - ..as for your recommendation about using DOM..that was part of my initial thought process but because it would have automatically removed through the AJAX call i didn't bother....but now my alternate solution does just that. it removes the item from the ddl using javascript and only rebinds the ddl when u switch dates...which always does a postback...so i'm good...

    thanks for the suggession though...the session-flag check is not a bad idea..but i think i would end up with the same problem cause the remote page seemed not to make the round trip to the server..which it would have to do to check the session variable....

    CC.
    Last edited by codecarnage; Dec 1, 2006 at 02:03 PM. Reason: spelling

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •