|
-
Aug 22nd, 2008, 12:12 AM
#1
[RESOLVED] Posting data
Friends,
I am on the way developing a website in ASP. I am using MS Access database.
In my home page, there is a textbox and a submit button. It is used to register a user's email address for receiving the newsletter. In the submit button, the action is to post the text to another asp page named newsletter.asp. I am going to write the code for entering the email to the database. So after adding it to the database, how can I load the webpage that the user was viewing before that...???
Also, after adding it to the database, I used response.write("Success). But I want to display a page which is same as the my other pages and the text should be placed in the middle of the page.
How can I do that...????
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Aug 22nd, 2008, 02:39 PM
#2
Re: Posting data
You can use the HTTP_REFERER server variable on the 'second' page, store it somewhere and after you submit the information to the database, Response.Redirect to the HTTP_REFERER value.
-
Aug 22nd, 2008, 09:02 PM
#3
Re: Posting data
Pal, What is the use of that variable?
I am using a free hosting service. So I dont know whether they will allow me or not.
Is there any other way? I mean while posting the data, a hidden text is passed to the other page. And when the process is over, using response.Redirect that page is loaded. Is that possible?
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Aug 23rd, 2008, 06:47 AM
#4
Re: Posting data
What mendhak suggested is pretty straight forward when using ASP.
Code:
<%
Dim strCameFrom
strCameFrom = Request.ServerVariables("HTTP_REFERER")
'Add info to the database
Response.Redirect strCameFrom
%>
-
Aug 23rd, 2008, 09:16 AM
#5
Re: Posting data
Thanks for all your reply, guys...
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|