Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Retrieve hiddentextbox value using xslt??

Back to Forum: Tech Off
  • User profile image


    I have a hidden text box value in my xslt page . Could anyone please help in retrieving the hidden text box value through xslt and assign the hidden textbox value to a variable?

  • User profile image


    If you want to assign a value to a hidden variable, just extract the value of the relevant node into the value attribute like so:

    <input type="hidden" name="myinputbox" value="{xpath}" />

    where 'xpath' is obviously the xpath to the value you want, and you do need the curly braces Smiley

    You can't assign the hidden field value to an xslt variable, as the xslt has already been rendered as HTML/XHTML by this time, I think you may be getting a little muddled in your timings ...

    Simply posting the page back will give you the value in the hidden field as part of the Form Variables.


  • User profile image

    Thank you.
     How to postback in xslt to get the hidden box value?

  • User profile image

    You don't postback in xslt.  xslt is used to render the html/xhtml page.  You post back from the rendered page using the standard submit button or a button linked to a javascript function which calls the submit() method of the form in the html.

    It's all a question of getting the right data into the right place to start with, then it makes you page very simple.  However, you may still have to resort to javascript or rely on the actions of standard aspnet controls to get you data back to the server. Remember your html/xhtml/aspx page in the client has no knowledge of the server!

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.