Click here to Skip to main content
12,830,941 members (40,649 online)
   

ASP.NET

 
QuestionWebServer Pin
anig12344-Oct-05 19:52
memberanig12344-Oct-05 19:52 
AnswerRe: WebServer Pin
minhpc_bk4-Oct-05 20:11
memberminhpc_bk4-Oct-05 20:11 
GeneralRe: WebServer Pin
anig12344-Oct-05 20:54
memberanig12344-Oct-05 20:54 
Questionhow to override the render method Pin
chitranjan gohil4-Oct-05 19:43
memberchitranjan gohil4-Oct-05 19:43 
AnswerRe: how to override the render method Pin
minhpc_bk4-Oct-05 20:12
memberminhpc_bk4-Oct-05 20:12 
QuestionHow to write the Debug funtion? Pin
shy84-Oct-05 17:33
membershy84-Oct-05 17:33 
AnswerRe: How to write the Debug funtion? Pin
minhpc_bk4-Oct-05 18:21
memberminhpc_bk4-Oct-05 18:21 
QuestionPLEASE HELP: File Upload Issues! Pin
jjarman4-Oct-05 13:50
memberjjarman4-Oct-05 13:50 
I've followed a number of exmaples, but I seem to always get the following error no matter what I try:

Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

If anyone could please help, I'd really appreciate it!

ASPX
======================================
<form id="Form1" method="post" runat="server" enctype="multipart/form-data">
<input type="hidden" runat="server" id="fileName" value='<%#DataBinder.Eval(Container.DataItem, "ProjectId")%>_Thumbnail.jpg' /> 
<input type="file" runat="server" id="fileThumbnail" maxLength="100000000" />
<input type="submit" runat="server" id="fileSubmit" onserverclick="fileSubmit_OnServerClick" />
</form>

======================================

CODEBEHIND C#
======================================
public void fileSubmit_OnServerClick(object sender, System.EventArgs e) {
	if (( fileThumbnail.PostedFile != null) && (fileThumbnail.PostedFile.ContentLength > 0)) {			{
		try {
			fileThumbnail.PostedFile.SaveAs(@"C:\Inetpub\wwwroot\clients\projectfiles\file.jpg");
			uploadLblMessage.Visible = true;
			uploadLblMessage.Text = "Uploaded Successfully";
		}
		catch(Exception ex) {
			uploadLblMessage.Visible = true;
			uploadLblMessage.Text = ex.Message;
		}
	} else {
		uploadLblMessage.Text = "Select a file to upload. Please Try Again!";
	}
}

======================================
AnswerRe: PLEASE HELP: File Upload Issues! Pin
minhpc_bk4-Oct-05 16:09
memberminhpc_bk4-Oct-05 16:09 
GeneralRunning in Debug Pin
jjarman4-Oct-05 17:51
memberjjarman4-Oct-05 17:51 
GeneralRe: Running in Debug Pin
minhpc_bk4-Oct-05 18:16
memberminhpc_bk4-Oct-05 18:16 
Questionglobal.asx.cs Pin
lxhan4-Oct-05 13:18
memberlxhan4-Oct-05 13:18 
AnswerRe: global.asx.cs Pin
minhpc_bk4-Oct-05 16:16
memberminhpc_bk4-Oct-05 16:16 
GeneralRe: global.asx.cs Pin
lxhan5-Oct-05 5:53
memberlxhan5-Oct-05 5:53 
QuestionA connection pooling error has occurred Pin
SABhatti4-Oct-05 11:41
memberSABhatti4-Oct-05 11:41 
AnswerRe: A connection pooling error has occurred Pin
Andy Marshall4-Oct-05 12:47
memberAndy Marshall4-Oct-05 12:47 
Questioni wanna get excell sheet code and input them to asp.net can i ? Pin
hamidoo4-Oct-05 6:56
memberhamidoo4-Oct-05 6:56 
QuestionStandard Deviation Graph?? Pin
parvinder sehrawat4-Oct-05 2:51
memberparvinder sehrawat4-Oct-05 2:51 
QuestionAccess Key Pin
mahmoud mohammed4-Oct-05 1:58
membermahmoud mohammed4-Oct-05 1:58 
AnswerRe: Access Key Pin
minhpc_bk4-Oct-05 16:19
memberminhpc_bk4-Oct-05 16:19 
QuestionNeed help in editing data in a textarea rather than a textbox Pin
Meax4-Oct-05 1:05
memberMeax4-Oct-05 1:05 
AnswerRe: Need help in editing data in a textarea rather than a textbox Pin
SABhatti4-Oct-05 11:29
memberSABhatti4-Oct-05 11:29 
QuestionCreating Screen Saver Pin
Vikramjit R.Rai3-Oct-05 23:06
sussVikramjit R.Rai3-Oct-05 23:06 
QuestionCreating Screen Saver Pin
Vikramjit R.Rai3-Oct-05 23:05
sussVikramjit R.Rai3-Oct-05 23:05 
QuestionSending mail using MIME Pin
adi024463-Oct-05 22:30
memberadi024463-Oct-05 22:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 30 Mar 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid