Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

Sending html page values to ASP page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark - 21 Apr 2008 20:27 GMT
Hi Gurus,
I am pretty new in ASP.net, so please help me solve a problem.
We have many HTML pages which we do not want to change.

What we want is on a button press it should goto a ASP page with all the
values.

I'll appreciate if I get some source example which I can try.

Please help me.
Mark
Mark Rae [MVP] - 21 Apr 2008 21:03 GMT
> We have many HTML pages which we do not want to change.
>
> What we want is on a button press it should goto a ASP page with all the
> values.

Can you clarify please:

1) Where is this button?

2) When you say an ASP page, do you actually mean an ASP.NET page? They're
very different...

3) What do you mean by "all the values"?

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Mark - 21 Apr 2008 21:46 GMT
Thanks for your reply.
I have created an test example to clarify.

On this form I have one input textbox and one Submit button. On submit I
want to process the data(Text1) in Validate.aspx.vb.
<form action ="../Validate.aspx" method ="post" >
   <input id="Text1" type="text"  /><br />
   <br />
   <input id="Submit1" type="submit" value="submit" />
   </form>
</body>

But when code reaches Validate Page_Load event, then Request.Form.Count
returns 0, when I am expecting Text1 value.

Public Partial Class Validate
   Inherits System.Web.UI.Page

   Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
       If Request.Form.Count > 0 Then
           Me.TextBox1.Text = Request.Form("Text1")
       End If
   End Sub
End Class

Tell me what am I doing wrong.
Thanks, Mark

>> We have many HTML pages which we do not want to change.
>>
[quoted text clipped - 9 lines]
>
> 3) What do you mean by "all the values"?
Mark - 21 Apr 2008 22:07 GMT
Guys,
It started working when I replaced ID with Name.
<input NAME="Text1" type="text"  />

Thanks guys for your help.
Mark

> Thanks for your reply.
> I have created an test example to clarify.
[quoted text clipped - 38 lines]
>>
>> 3) What do you mean by "all the values"?
Peter Bromberg [C# MVP] - 21 Apr 2008 21:14 GMT
What you are describing is a simple FORM post. As long as all the "values"
are inside the FORM tags, they will be posted to the target pages. And be
careful using the term "ASP" - that means classic ASP, this is for ASP.NET.
-- Peter
To be a success, arm yourself with the tools you need and learn how to use
them.

Site: http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://ittyurl.net

> Hi Gurus,
> I am pretty new in ASP.net, so please help me solve a problem.
[quoted text clipped - 7 lines]
> Please help me.
> Mark

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.