Form submitting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Corinne

    #1

    Form submitting

    Hi All,

    Recently tried to move from asp to visual studio 2005.

    I have a form and a button.

    I want the button to call a function and change a few of the hidden fileds
    value before the form is submitted.

    In asp, I used to call a javascript function and then the form.submit()
    function.

    What woul dbe the best equivalent/practice using Visual Studio 2005?

    Thank you

    Corinne


  • Nathan Sokalski

    #2
    Re: Form submitting

    My suggestion would be to use the Button.OnClient Click property (which
    basically sets the JavaScript onclick event of the Button) to modify the
    desired hidden fields. If you do this, when the Button is clicked the
    JavaScript you assigned to the Button.OnClient Click property will be
    executed and then the form will be submitted. This way, you will not need to
    worry about including the form.submit() method in your code, and the form
    will not get submitted twice. Good Luck!
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。


    "Corinne" <clofts@shepher d-neame.co.ukwrot e in message
    news:u47X%23mdU HHA.4028@TK2MSF TNGP02.phx.gbl. ..
    Hi All,
    >
    Recently tried to move from asp to visual studio 2005.
    >
    I have a form and a button.
    >
    I want the button to call a function and change a few of the hidden fileds
    value before the form is submitted.
    >
    In asp, I used to call a javascript function and then the form.submit()
    function.
    >
    What woul dbe the best equivalent/practice using Visual Studio 2005?
    >
    Thank you
    >
    Corinne
    >

    Comment

    Working...