Form post back in ASP.Net 1.1

Discussion in 'ASP .Net' started by =?Utf-8?B?U3VuZGFyYXJhamFu?=, Apr 25, 2005.

  1. Dear Folks,

    I have a hyperlink in my page - webform1.aspx
    on click of this i want it to post back to the second page -webform2.aspx.
    is this possible in ASP.Net 1.1. if so how can i go about it.
    I tried to use a javascript function for this

    function dopostback()
    {

    document.Form1.hdnpostback.value="hhhhh";
    document.Form1.method = "Post";
    document.Form1.action="webform2.aspx";
    document.Form1.submit();
    }

    but it was not working.

    thanx in advance
    --
    S.Sundararajan
     
    =?Utf-8?B?U3VuZGFyYXJhamFu?=, Apr 25, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?U3VuZGFyYXJhamFu?=

    Snig Guest

    Snig, Apr 25, 2005
    #2
    1. Advertising

  3. Here are some options:
    1) Output an old fashioned non-server form to the client (without the runat=
    'server' attribute) Set the action attribute like you would have in
    ASP.OLD, and use javascript to submit the form.
    2) use client side script to change your ASP.NET form action attribute
    3) use this webform control: http://www.wilsondotnet.com/Controls/

    Note: In ASP.NET 2.0 you will be able to more easily post to another page.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "Sundararajan" <> wrote in message
    news:...
    > Dear Folks,
    >
    > I have a hyperlink in my page - webform1.aspx
    > on click of this i want it to post back to the second page -webform2.aspx.
    > is this possible in ASP.Net 1.1. if so how can i go about it.
    > I tried to use a javascript function for this
    >
    > function dopostback()
    > {
    >
    > document.Form1.hdnpostback.value="hhhhh";
    > document.Form1.method = "Post";
    > document.Form1.action="webform2.aspx";
    > document.Form1.submit();
    > }
    >
    > but it was not working.
    >
    > thanx in advance
    > --
    > S.Sundararajan
     
    Steve C. Orr [MVP, MCSD], Apr 25, 2005
    #3
  4. hi sundar,

    Are you trying to navigate to the second page on click of the hyperlink
    button?
    if yes just use the server.transfer or the response.redirect on the click
    event of the hyperlink button.

    regds
    Kannan.V

    "Sundararajan" wrote:

    > Dear Folks,
    >
    > I have a hyperlink in my page - webform1.aspx
    > on click of this i want it to post back to the second page -webform2.aspx.
    > is this possible in ASP.Net 1.1. if so how can i go about it.
    > I tried to use a javascript function for this
    >
    > function dopostback()
    > {
    >
    > document.Form1.hdnpostback.value="hhhhh";
    > document.Form1.method = "Post";
    > document.Form1.action="webform2.aspx";
    > document.Form1.submit();
    > }
    >
    > but it was not working.
    >
    > thanx in advance
    > --
    > S.Sundararajan
     
    =?Utf-8?B?S2FubmFuLlYgW01DU0QubmV0XQ==?=, Apr 25, 2005
    #4
  5. As Kannan has rightly mentioned, if u want navigate to the second page, you
    can use server.transfer or Response.Redirect. But, if you want to persist and
    use the values of the controls that are on the first Web page, you can use
    Server.Transfer. In the Server.Transfer method, you have the PreserveForm
    parameter. If you set this parameter to true, you can save the values of the
    controls on the first Web page as name value pairs in a collection.



    "Kannan.V [MCSD.net]" wrote:

    > hi sundar,
    >
    > Are you trying to navigate to the second page on click of the hyperlink
    > button?
    > if yes just use the server.transfer or the response.redirect on the click
    > event of the hyperlink button.
    >
    > regds
    > Kannan.V
    >
    > "Sundararajan" wrote:
    >
    > > Dear Folks,
    > >
    > > I have a hyperlink in my page - webform1.aspx
    > > on click of this i want it to post back to the second page -webform2.aspx.
    > > is this possible in ASP.Net 1.1. if so how can i go about it.
    > > I tried to use a javascript function for this
    > >
    > > function dopostback()
    > > {
    > >
    > > document.Form1.hdnpostback.value="hhhhh";
    > > document.Form1.method = "Post";
    > > document.Form1.action="webform2.aspx";
    > > document.Form1.submit();
    > > }
    > >
    > > but it was not working.
    > >
    > > thanx in advance
    > > --
    > > S.Sundararajan
     
    =?Utf-8?B?RGVlcHRpIEthbGFrb25kYQ==?=, Apr 25, 2005
    #5
  6. =?Utf-8?B?U3VuZGFyYXJhamFu?=

    TDAVISJR Guest

    Remember to use a Link Button instead of a regular HTML <a href.. The link
    button default behavior is a postback and you can capture the click event
    and then do your server re-direction in there.

    --
    TDAVISJR
    aka - Tampa.NET Koder


    "Sundararajan" <> wrote in message
    news:...
    > Dear Folks,
    >
    > I have a hyperlink in my page - webform1.aspx
    > on click of this i want it to post back to the second page -webform2.aspx.
    > is this possible in ASP.Net 1.1. if so how can i go about it.
    > I tried to use a javascript function for this
    >
    > function dopostback()
    > {
    >
    > document.Form1.hdnpostback.value="hhhhh";
    > document.Form1.method = "Post";
    > document.Form1.action="webform2.aspx";
    > document.Form1.submit();
    > }
    >
    > but it was not working.
    >
    > thanx in advance
    > --
    > S.Sundararajan
     
    TDAVISJR, Apr 25, 2005
    #6
  7. hi sundar,

    please do not post the same question in multiple forums, if u want to post
    pls cross post you queries, just a request, so that its easy for people to
    track the responses.

    It happened to me that i was searching for the reply i wrote, and finally
    found it in another group.

    regds
    Kannan.V


    "Sundararajan" wrote:

    > Dear Folks,
    >
    > I have a hyperlink in my page - webform1.aspx
    > on click of this i want it to post back to the second page -webform2.aspx.
    > is this possible in ASP.Net 1.1. if so how can i go about it.
    > I tried to use a javascript function for this
    >
    > function dopostback()
    > {
    >
    > document.Form1.hdnpostback.value="hhhhh";
    > document.Form1.method = "Post";
    > document.Form1.action="webform2.aspx";
    > document.Form1.submit();
    > }
    >
    > but it was not working.
    >
    > thanx in advance
    > --
    > S.Sundararajan
     
    =?Utf-8?B?S2FubmFuLlYgW01DU0QubmV0XQ==?=, Apr 25, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Phifer

    Post Back Function Name and Dynamic Form ID

    Kevin Phifer, Nov 8, 2003, in forum: ASP .Net
    Replies:
    9
    Views:
    558
    Kevin Phifer
    Nov 11, 2003
  2. Joby
    Replies:
    0
    Views:
    1,637
  3. =?Utf-8?B?Z29yaWxsYQ==?=
    Replies:
    1
    Views:
    774
    Masudur
    May 25, 2007
  4. Sundararajan

    Form Post Back in ASP.Net 1.1

    Sundararajan, Apr 25, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    136
    Kannan.V [MCSD.net]
    Apr 25, 2005
  5. Don Glover the younger

    ASP, FORMS, POST METHOD And Post with out form(???)

    Don Glover the younger, Jul 13, 2003, in forum: ASP General
    Replies:
    0
    Views:
    472
    Don Glover the younger
    Jul 13, 2003
Loading...

Share This Page