Results 1 to 5 of 5

Thread: [RESOLVED] Posting data

  1. #1

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Resolved [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,...

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  3. #3

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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,...

  4. #4
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    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
    %>

  5. #5

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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
  •  



Click Here to Expand Forum to Full Width