472,371 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Passing a string from HTML page to ASP

33
Hi,

I am using a HTML page as login page and my 2nd page is in ASP. I want to pass the values in the text boxes login name & password to the 2nd page and want to check its validity there. But I cant get these values in my 2nd page.
I have used the code

loginname = trim(Request.Form.Item("txtLogin")) in the 2nd page.

But only blank is returning..

At the same time, I have written the same code for passing some variables from one ASP page to other. It works fine...

Is this a problem due to HTML-ASP link ?
Plz help me...
Matsam
Jul 4 '07 #1
8 2035
Can you post some code - the form on the HTML page would be useful
Jul 4 '07 #2
ak1dnar
1,584 Expert 1GB
Hi,

I am using a HTML page as login page and my 2nd page is in ASP. I want to pass the values in the text boxes login name & password to the 2nd page and want to check its validity there. But I cant get these values in my 2nd page.
I have used the code

loginname = trim(Request.Form.Item("txtLogin")) in the 2nd page.

But only blank is returning..

At the same time, I have written the same code for passing some variables from one ASP page to other. It works fine...

Is this a problem due to HTML-ASP link ?
Plz help me...
Matsam
Hi Matsam,

Can you show us the codings that you made so far for HTML form and the .aspx page (if any)
Thanks !
Jul 5 '07 #3
Matsam
33
Hi Matsam,

Can you show us the codings that you made so far for HTML form and the .aspx page (if any)
Thanks !

Hi,

I am sorry that i didnt include the code...

Following is the code for 1st page
[html]
<form method="post" action="page2.asp" id=form1 name=form1>

<input name="txtLogin" size="34">

<input type="password" name="txtPwd" size="36">

<A href="page2.asp" > Connect</A>
[/html]

In the 2nd page:
Expand|Select|Wrap|Line Numbers
  1. loginname =  trim(Request.Form.Item("txtLogin"))
  2. pwd = trim(Request.Form.Item("txtPwd"))
  3. Response.write loginname  '>>>>> Prints nothing...
  4.  
Matsam
Jul 5 '07 #4
ak1dnar
1,584 Expert 1GB
Codebehind=VB
Expand|Select|Wrap|Line Numbers
  1. dim loginname as string =  trim(Request.Form("txtLogin"))
  2. dim pwd as string  = trim(Request.Form("txtPwd"))
  3. Response.write(loginname)
Jul 5 '07 #5
jhardman
3,406 Expert 2GB
the problem is that you linked to the asp page rather than submitting the form. You should use [html]<input type="submit" value="click here to continue">[/html] in order to submit the form data. alternatively you could submit the form with javascript when the user clicks the link. I'm not a javascript expert, but the code is something like this:[html]<A onClick="document.all.form.submit()"> Connect</A>[/html]Jared
Jul 5 '07 #6
ak1dnar
1,584 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1.  
  2. <form method="post" action="page2.asp" id="form1" name="form1">
  3. <input name="txtLogin" size="34"> 
  4. <input type="password" name="txtPwd" size="36">
  5. <!-- OR YOU CAN REMOVE THIS -->
  6. <A href="page2.asp" > Connect</A>
  7. <!--
  8. AND ADD THIS THIS TO SUBMIT THE FORM-->
  9. <input type="submit" valre="Click here">
  10. </form>
  11.  
Sorry i missed this Line,

[HTML]<A href="page2.asp" > Connect</A>[/HTML]
from the original Post.

Thanks!
Jul 6 '07 #7
Matsam
33
the problem is that you linked to the asp page rather than submitting the form. You should use [html]<input type="submit" value="click here to continue">[/html] in order to submit the form data. alternatively you could submit the form with javascript when the user clicks the link. I'm not a javascript expert, but the code is something like this:[html]<A onClick="document.all.form.submit()"> Connect</A>[/html]Jared

Hi,

Thanks for ur help. I tried the Submit button.. But still it is not working. On clicking the submit button nothing happens. It is not going to the next page.
My post code is

<head><TITLE>ASP Page</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">

<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0" >
<meta name="ProgId" content="FrontPage.Editor.Document">
<form method="post" action="Page2.asp" id=form1 name=form1>
</head>
------
------
------

<P align=center><INPUT id=submit1 type=submit value=Submit name=submit1>&nbsp;
---
--

Please help...

Matsam
Jul 6 '07 #8
Matsam
33
Hi,

Thanks for ur help. I tried the Submit button.. But still it is not working. On clicking the submit button nothing happens. It is not going to the next page.
My post code is

<head><TITLE>ASP Page</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">

<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0" >
<meta name="ProgId" content="FrontPage.Editor.Document">
<form method="post" action="Page2.asp" id=form1 name=form1>
</head>
------
------
------

<P align=center><INPUT id=submit1 type=submit value=Submit name=submit1>&nbsp;
---
--

Please help...

Matsam


Hi,

Many many thanks for ur help.
My problem is solved when i used submit instead of link to page2.

Thanks once again
Matsam
Jul 6 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
27
by: Oscar | last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in an ASP page to another HTML-page. Is there someone who can provide me with a small sample or a link to see how this is...
8
by: CHouck | last post by:
I have what seems to be a simple problem but I can't figure it out. I have a page where I have a link with variables built in which I want to pass through the URL so another page can pick the...
3
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1...
6
by: Newbie | last post by:
How do I pass string values from one webform to another?
13
by: Maxim | last post by:
Hi! A have a string variable (which is a reference type). Now I define my Method like that: void MakeFullName(string sNamePrivate) { sNamePrivate+="Gates" }
4
by: B Squared | last post by:
I'm trying to pass a string from the current html page to one I'm calling. I've read (in the O'Reilly text) this involves using "?", but there's no example. For example, given I have a standard...
3
by: James Robertson | last post by:
I am new to the ASP and VB thing so be kind. Question I have is that I have created an ASPX web site to use as an E-Mail page. But I want to use this for a lot of users. Can I create the link on...
4
by: moondaddy | last post by:
I have a htm page where I need to pass some data to an aspx page as a means of sending data to the database. I don't need to see the aspx page so I was going to put it in a hidden iframe. This...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.