Guest User

Untitled

a guest
Aug 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Implement a custom ASP.NET ListControl that post back data with javascript
  2. $.ajax({
  3. type: "GET",
  4. url: "process_me.aspx?value=" + $("#id-of-hidden-value-of-list").val(),
  5. success: function(){
  6. //success (not finished)
  7. alert("woot!")
  8. }
  9. });
  10.  
  11. Response.Write("<input type='hidden' name='list-value'>");
  12. ..
  13.  
  14. document.forms[0].list-value.value = selectedValue;
  15. document.forms[0].submit();
  16.  
  17. ..
  18.  
  19. if(Request.Form["list-value"]) != "" { // do something }
Add Comment
Please, Sign In to add comment