473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Form post back in ASP.Net 1.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
Nov 19 '05 #1
6 1975
This might be useful:
http://www.codeproject.com/aspnet/jsnopostback.asp
Snig.

Nov 19 '05 #2
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" <su**********@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
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

Nov 19 '05 #3
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

Nov 19 '05 #4
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

Nov 19 '05 #5
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" <su**********@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
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

Nov 19 '05 #6
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

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jason | last post by:
Is it possible to POST a FORM to multiple URLS at the same time....OR.... Is the only workaround for this scenario to use response.redirect in the called ASP page and do a multi processing? -...
3
by: Micromanaged | last post by:
Is it possible (and if so, how?) to have an asp form page that based upon a user's selection on a field, would generate a input field b that the user selects? For example: User selects "name"...
2
by: Mark Creelman | last post by:
Hi: I am relatively new to ASP. I prefer Perl, but need to do this form to e-mail sipt for a web page, See Example of script below that works fine. I want to add the feature to this where it...
3
by: Kassam | last post by:
Hi MVPs out there. I have constructed an order form and the users will enter the informtion. I now need to send the filled out form as an e-mail (body being the HTML with the fille din data) to...
6
by: John Bowman | last post by:
Hi All, I must be missing something really obvious, so I'd appreciate someone helping me out. I have a simple Windows form that currently only has a title bar (aka the Text Property is set) and...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
4
by: Rolf Rosenquist | last post by:
From a page with a form I collect the fields in the next page. The fields are compared with a database and if a certain condition does not fit, I want to go back to the first page with the form,...
4
by: dac | last post by:
I am quietly going insane on this project. I've never worked on a project like this one before. All my previous sticky forms were for data entry, not editing. I don't know how to display the form...
19
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr In a nutshell, the form uses javascript to hash...
11
by: Twayne | last post by:
Hi, Newbie to PHP here, no C or other relevant background, so pretty niave w/r to the nuances etc. but I think this is pretty basic. XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.