|
i wanna set a login web page, but when i pass the password and username to the server, i got NullReferenceExcpetionwasunhandledbyusercode, can anyone help to solve this question?
this is my codes:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string username = Request.Form.Get("userNametxt").ToString();
string password = Request.Form.Get("passwordtxt").ToString();
Response.Redirect("Default2.aspx");
}
}
this is the html code for the login page
<title>Untitled Page
thanks for help~~
|
|
|
|
|
When the page first loads, you try to read values from Request.Form. As nothing has been posted to the page, you get null references. Then you try to call the ToString method on the references which causes a NullReferenceException, as you can't call a method on a null reference.
---
b { font-weight: normal; }
|
|
|
|
|
I m totally fresh user of ASP.Net.currently i have two question if u please guide me.
1 ---> How can i dind the controls with the data base?
2 ---> How can i get the list from database and populate the combo box/Listbox?
Thank You
Adeel Khalil
|
|
|
|
|
Muhammad83 wrote: How can i dind the controls with the data base?
You cannot. The database knows nothing about your controls and it never should.
Muhammad83 wrote: How can i get the list from database and populate the combo box/Listbox?
Create a query, Execute the query and read the results in and populate the list box with it. You may wish to read up on ADO.NET for that because there are so many ways you can get data in and out of a database you need to pick the way that is best for you.
|
|
|
|
|
Yeah, as Colin said, ADO.NET is what you're looking for.
Google "ADO.NET" and you'll get a bunch of samples that can help you achieve what you're looking for.
You should also look into picking up a beginners ASP.NET book. It will help you tremendously.
-Goalie35
|
|
|
|
|
Dear All,
I am making web based Application Using asp.net and C#(Visual studio 2005).
There are several form which have same structure but different label name.
like unit master have unit id and unit description , similarly Service master have service id and service Description.Now i want to make one web form and Dynamically change label name based om menu item selection
AnyOne having any idea Please Guide me.Or suggest me some alternative.
thanks
regards
imran khan
|
|
|
|
|
hello,
In Repeater_Itemcommand event ,on the button clik event
when I redirect the page from one to another ,I got the error
"Thread is being aborted at System.Threading.Thread.AbortInternal(),
at System.Threading.Thred.Abort(object stateinfo), at System.web.HttpResponse.Redirect(string url), at System.web.HttpResponse.Redirect(string url,boolean endResponse), at System.web.HttpResponse.End()at Repeater_Itemcommand(object sndr,ReptrEventArgs e) "
"How to solve this? I haven't used thread anywhere in the code.
please guide.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
try Response.Redirect("YourPage", true) this.
|
|
|
|
|
Hi All
I need to write to my web.config file under program control. I can read it no problem.
If I create an account for "everyone" then I can write to the web config file else I get a access denied message.
How can I do this under program control?
Regards
|
|
|
|
|
Give permission to ASPNET login and problem will be solved.
|
|
|
|
|
Thanx
But I need to roll out to 30 clients and none of them will know how to do this. It must happen automatically.
Regards
|
|
|
|
|
You should give this permission on the folder which contains your asp.net application. (usrename: \\sysname\aspnet, read/write)
|
|
|
|
|
sorry i'm lost
Do you mean that you must specify the setting when deploying the application?
|
|
|
|
|
Sorry i'm lost
Do you mean that I must set the setting when deploying the application?
|
|
|
|
|
i am using vs2005 to coding asp.net projects, my default internet explorer is firefox, therefore everytime i press F5 to run the project, the firefox is always be opened, just wanna ask if i need to change firefox to microsoft internet explorer, how can i do it in vs2005?
thanks for help~
|
|
|
|
|
Hi,
Do thses steps:
1. Open a webform ( like default.aspx ).
2. Select "Browse With..." in the "File" menu
3. Set "Internet Explorer" the "Default" browser
It should work
Mohan
|
|
|
|
|
it works, thanks a lot~~~
|
|
|
|
|
Internet Explorer is a brand of "web browser" not a type of program. Your default "web browser" is Firefox, but you would like it to be Internet Explorer.
|
|
|
|
|
Hi all,
I put a flash object in my webform that makes an action when clicked.
the problem is on my pc it fuctions as it should do,but when tested on another pc i must click twice to make it work as the code inside the flash object designed to work,maybe it's a browser issue i don't know.
thnx alot
|
|
|
|
|
are you browsing via FireFox (on your PC) ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
No i'm using internet explorer browser can u help me solve it
thx for ur reply
|
|
|
|
|
|
Thanx alot it helped so much
|
|
|
|
|
Hi everyone,
here's the scenario:
Workstation 1: Web Server (IIS), Database Server (SQL 2000)
Document Root: Somewhere on LAN, not on workstation 1 (but can be accessed from workstation 1)
Virtual Directory is mapped to the document root and site runs like a
charm.
Now, we need to make another folder on the lan searchable.
It's mammoth, has PDF, PPT, DOC, XLS etc etc.
- Can the Microsoft indexing Service help?
- Can it index PDF and other filetypes like DOC PPT XLS?
- And is it very difficult to create an ASP/ASP.NET based
query page to retrieve and display results?
Thanks.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
Dear All...
I want a regular expression for matching numeric values, something like the isFinite() javascript function or !isNaN() javascript function
Somethiing to match this:
1
12
123
1234
12345
123456
1234567
.1
0.1
0.12
0.123
0.1234
.12345
123.123
1234.1234
...
Thanx in advance
Best Regards
3ala2
|
|
|
|