tags:

views:

234

answers:

1

Hi

I have a jquery simple modal with a textbox and linkbutton on when the link button click event is fired and I try to get the textbox's value in the code behind it is empty

Any ideas?

+2  A: 

You should make sure that the modal window is appending inside form tag instead of the body tag.

http://www.ericmmartin.com/projects/simplemodal/#options

  • appendTo [String:'body']

The jQuery selector to append the elements to. For ASP.NET, use 'form'.

bretik
This is correct, by default most jquery modals (including the UI one) append to the body, so it moves the textbox outside the submitted form. Because of this, you're not actually posting it's value to the server, using the change in the above answer, it solves this problem.
Nick Craver