Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to do a c# postback submition in an AJAX page

Status
Not open for further replies.

tekkerguy

Programmer
Nov 16, 2005
196
US
I have an aspx page which uses pagemethods to update pulldowns without firing postbacks.

The problem is it changed the submit button's onclick event to:

onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("submitter", "", true, "", "", false, false))

instead of firing the c# method it was using before pagemethods.

How do I get the paget to used the c# code instead of overwritting it with this?
 
Ok, got that working, but it seems that I need to submit through ajax instead.

I have some dropdowns, which are populated by ajax to prevent having to do a postback.

the problem is, I have one dropdown that populates another based on the first's selection.

This is working fine, and I can see the new entries in the second dropdown.

The problem is, if I do a view source, those new entries aren't in the second postback. I'm still seeing the old dropdown entries.



So I've created an ajax/javascript submit function.

I put each of the dropdown and textbox controls into an array, and pass that back to the pagemethod., but I keep getting a message that says the script on the page is taking too long, and it hangs.

Is there something I need to do to pass arrays to the c# pagemethod?



all other ajax functions are working
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top