473,395 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Problem in Asp page cannot get data from a html page

Vkas
78
my html page is (default.html)
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4.     <title>BWR&MD</title> 
  5.     <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
  6.     <meta content="Microsoft FrontPage 4.0" name="GENERATOR" />
  7.     <meta content="FrontPage.Editor.Document" name="ProgId" />
  8. </head>
  9. <body>
  10.     <center>
  11.         <p>
  12.             &nbsp;</p>
  13.         <p style="text-align: center">
  14.             &nbsp;<br />
  15.             <br />
  16.             <br />
  17.             <br />
  18.             <strong><em><span style="color: #cc33ff">BY THE NAME OF ALLAH&nbsp;</span></em></strong></p>
  19.         <form action="try.asp" method="post">
  20.             <p>
  21.                 &nbsp;&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 
  22.                 <input type="text" size="20" name="Name" />
  23.                 <br />
  24.                 <br />
  25.              &nbsp;&nbsp;&nbsp; Password : 
  26.                <input type="password" size="20" name="Pas" />
  27.             </p> 
  28.             Color&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 
  29.             <select size="1" name="Color">
  30.                 <option selected="selected">Red</option>
  31.                 <option>Green</option>
  32.                 <option>Blue</option>
  33.             </select>
  34.             <br />
  35.             <br />
  36.             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  37.             <input type="submit" value="  LOGIN   " name="B1" />
  38.             <p>
  39.                 <font color="#660000">Developed <span style="color: #000000">By ATptech</span></font></p>
  40.             <p>
  41.                 &nbsp;</p>
  42.         </form>
  43.     </center>
  44. </body>
  45. </html>
  46.  
my asp page (try.asp) with c# as coding
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#"Debug="true" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>Test</title>
  6. </head>
  7. <body>
  8.     <h4> Welocme Students user.aspx shown with vb as a coding page</h4>
  9.     <%
  10.    ' (HOW CAN I GET DATA FROM That Htm page form in try.asp page )
  11. %>
  12. </body>
  13. </html>
  14.  
Can any one tell how to code in c# to get data ???
Jan 30 '10 #1
1 2169
jhardman
3,406 Expert 2GB
1- You cannot code an ASP page (file extension .asp or .jsp) in C#. The possible languages are jscript (which has a similar language syntax to C#, but I don't know anyone who uses it, so I couldn't help you with that) and VBScript (the language most of us use). You could write ASP.NET pages (file extension .aspx) in C#. If that is what you are trying to do, please post in the ASP.NET forum (notice this is the ASP forum, not the ASP.NET forum). Looking over the code you have above it looks like you have pulled code from some ASP.NET sources and some ASP sources. Please note that although they are both Microsoft technologies, they are not compatible.

2- Getting form inputs in ASP is very easy, for example, if you wanted to just print out the form input you could say this:
Expand|Select|Wrap|Line Numbers
  1. <h4> Welocme Students</h4>
  2. <%
  3. response.write request.form("Name")
  4. %>
  5. </body>
  6. </html>
Please let me know if this helps.

Jared
Feb 1 '10 #2

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

Similar topics

3
by: Dave | last post by:
Hey, I'm running a localhost web server...W2K with IIS 5.0, and I'm trying to use ASP/ADO to access my Access database. When I first load the page, everything works, but if i hit refresh (F5 or...
7
by: Aaron Prohaska | last post by:
I have just run into a problem where I have a page that posts back to itself to execute code, except when the page does the post back it somehow executes code that is in our home page for the site....
3
by: Tyrone Slothrop | last post by:
The first question, is this even possible? What I need to do is pass the contents of a PHP web page from a textarea using window.open method to a new browser window and display it. The page has...
3
by: Epetruk | last post by:
Hi, I'm trying to design a simple web form, but I cannot get the code in the btnSubmit_ServerClick event to fire. What am I doing wrong? Here's the codebehind: using System; using...
1
by: Stephen Adam | last post by:
Hi there, I've just started a c# project at work where I cannot use Visual Studio. I am trying to pass variables from one form to another. When I try to create an instance of the sending class...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
4
by: Alex Sibilev | last post by:
Hello, I have a really weird problem I've been trying to solve it without any luck for the last couple of hours :( I'm writing a "conference board" application (quite similar to ASP.NET...
11
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as...
3
by: anthonybrough | last post by:
I have an asp page that has a form to collect user data in a form. when the user clicks submit the input is validated. If any fields are not acceptable the user clicks on a button to go back to...
4
by: naveenmurthy | last post by:
Hello All, I have created a .mht file in following format. 1. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.