473,385 Members | 2,044 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,385 software developers and data experts.

request.form error (Object reference not set to an instance of an object)

1
I'm new to the .net environment. What I'm trying to do is to have an html page call a .aspx application and pass certain information.


I have a field in the html file

<input type="text" name="UserName">

I'm call the .aspx program
<form name="form1" method="POST" action="/application/test.aspx?">

In the application, I'm trying to retrieve the value in 'username'

reqUsername = Request.Form("Username")

I'm getting the following error: Object reference not set to an instance of an object.

Is there something I'm not declaring or any other ideas.

Thanks in advance
Jan 24 '07 #1
2 1840
enreil
86
You can pass variables in the query string. This page explains it better than I could:

http://www.codeproject.com/aspnet/QueryString.asp

I'm new to the .net environment. What I'm trying to do is to have an html page call a .aspx application and pass certain information.


I have a field in the html file

<input type="text" name="UserName">

I'm call the .aspx program
<form name="form1" method="POST" action="/application/test.aspx?">

In the application, I'm trying to retrieve the value in 'username'

reqUsername = Request.Form("Username")

I'm getting the following error: Object reference not set to an instance of an object.

Is there something I'm not declaring or any other ideas.

Thanks in advance
Jan 24 '07 #2
kenobewan
4,871 Expert 4TB
Just curious why you need another page? Why not just use an aspx page to show and process the form?
Jan 25 '07 #3

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

Similar topics

6
by: Christopher Brandsdal | last post by:
Hi! I get an error when I run my code Is there any other way to get te information from my form? Heres the error I get and the code beneath. Line 120 is market with ''''''''''''Line...
4
by: Gerhard Pretorius | last post by:
ON Win 2003 IIS6, Since yesterday, (12 Aug 2003) for some strange reason, (after installing WindowsServer2003-KB823980-x86-ENU.exe) I cannot pass the Request object to to VB COM DLL. I have...
2
by: Terry Mulvany | last post by:
namespace CIBWeb { public class BasePage : System.Web.UI.Page { public BasePage() { } protected override void OnInit(EventArgs e) {
10
by: George G. | last post by:
Hi there, I am busy writing a new asp.net application and I am reusing some of my existing asp functions and methods in a user control. I need access to session, request and response in some of...
0
by: Dica | last post by:
Hi all I've got a java microEdition client trying to make soap requests to my .Net service. i keep getting "Server was unable to process request..." err msg when attempting to make the request....
10
by: Bernie Hunt | last post by:
This is probably a silly question, but I've gotten myself confused. My app has two forms, form1 and form2. form1 is the start up object in the propers. An event in form1 instantiates form2. ...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
12
by: Rob | last post by:
Let's say you open Form1 that contains TabControl1 There are several tabs on TabControl1 Now you open a new Form2 that contains a User Control How can you determine the Selected tab in Form1...
6
by: jake | last post by:
I think I may why this is happening but I am a little fuzzy as to what the solution should be as I am somewhat new to all of this. My simplified code that generates the error is: public static...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.