Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 23rd, 2007, 11:23 PM
Registered User
 
Join Date: Sep 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Some help required !

Hi Everyone, Some help required :-

There is a website "www.mywebsite.com". Each time a link is opened, a form action is generated dynamically .The form consists of two button with the same name "mybutton", but the value of each button is different.I want to submit the form automatically( using either the WebBrowser component or the HTTPWebRequest class), whenever the user enters the main url in a textbox.

Eg:-

User enters www.mywebsite.com/1234.html, then a page is shown with the form with <form "action"="www.abc.mywebsite.com/1234.html">and the two buttons, <input type=submit name="mybutton" value="button1"> and <input type=submit name="mybutton" value="button2">.

If there is some other link like www.mywebsite.com/87878.html then the form action changes..

So basically I need to do the following

1).Get the form action of the URL entered by the user.
2).Submit the form with the method POST.

I searched a lot for some help on the topic, but as I couldn't, I am asking for help. Thank you. :)
  #2 (permalink)  
Old September 24th, 2007, 04:01 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You wouldn't submit any useful data to the new page if all the form contains is 2 buttons. In any event, I wouldn't render a form dynamically. I would provide a text box and 2 buttons like you stated above but I would use the buttons click event handler and post to the page listed in the textbox using a WebRequest/Response.

Look into HttpWebRequest and HttpWebResponse

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
Professional IIS 7 and ASP.NET Integrated Programming
Wrox Blox: Introduction to Google Gears
Wrox Blox: Create Amazing Custom User Interfaces with WPF and .NET 3.0
================================================== =========
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help required zaeem SQL Server 2000 2 May 28th, 2008 12:48 AM
SQL help required Teessider_2000 MySQL 1 January 10th, 2007 02:15 AM
No value given for one or more required parameters ableton ADO.NET 2 July 18th, 2006 02:12 AM
Is it required to use Apache? marjan Beginning PHP 3 March 9th, 2004 07:18 PM
Required files help please sdig BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 June 7th, 2003 09:46 AM



All times are GMT -4. The time now is 02:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.