Click here to Skip to main content
15,889,595 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to Convert an ASP.NET Using C# Web Application into A Desktop Application Pin
BalasubramanianK10-Mar-09 0:49
BalasubramanianK10-Mar-09 0:49 
GeneralRe: How to Convert an ASP.NET Using C# Web Application into A Desktop Application Pin
jimish110-Mar-09 18:39
jimish110-Mar-09 18:39 
GeneralRe: How to Convert an ASP.NET Using C# Web Application into A Desktop Application Pin
Cybernate11-Mar-09 6:43
Cybernate11-Mar-09 6:43 
QuestionWeb Service Problem Pin
ais0710-Mar-09 0:20
ais0710-Mar-09 0:20 
AnswerRe: Web Service Problem Pin
Calin Tatar10-Mar-09 7:25
Calin Tatar10-Mar-09 7:25 
Questionuploading the file? Pin
Che _Guevara9-Mar-09 23:48
Che _Guevara9-Mar-09 23:48 
AnswerRe: uploading the file? Pin
Xmen Real 9-Mar-09 23:51
professional Xmen Real 9-Mar-09 23:51 
AnswerRe: uploading the file? Pin
rakeshs3129-Mar-09 23:53
rakeshs3129-Mar-09 23:53 
cs file


using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;

public partial class UpLoad : System.Web.UI.Page
{
string sFileDir = "C:\\";
protected void Page_Load(object sender, EventArgs e)
{
string sFileDir = "C:\\";
long lMaxFileSize = 4096;
}

private void DeleteFile(string strFileName)
{
if (strFileName.Length > 0)
{
FileInfo fi = new FileInfo(strFileName);
if (fi.Exists)
{
fi.Delete();
}
}
}
}




aspx file


]]>





<title>Untitled Page



void btnUploadTheFile_Click(object Source, EventArgs evArgs)
{
string strFileNameOnServer = txtServername.Value;
string strBaseLocation = "c:\\temp\\";

if ("" == strFileNameOnServer)
{
txtOutput.InnerHtml = "Error - a file name must be specified.";
return;
}

if (null != uplTheFile.PostedFile)
{
try
{
uplTheFile.PostedFile.SaveAs(strBaseLocation+strFileNameOnServer);
txtOutput.InnerHtml = "File <b>" +
strBaseLocation+strFileNameOnServer+"</b> uploaded successfully";
}
catch (Exception e)
{
txtOutput.InnerHtml = "Error saving <b>" +
strBaseLocation+strFileNameOnServer+"</b><br />"+ e.ToString();
}
}
}




Select file:
Name on server:

onserverclick="btnUploadTheFile_Click" runat="server"/>









In this u can specify the path ,the file to be uploaded

Questionregsvcs on Vista Pin
thomasa9-Mar-09 23:34
thomasa9-Mar-09 23:34 
AnswerRe: regsvcs on Vista SOLUTION Pin
thomasa10-Mar-09 3:06
thomasa10-Mar-09 3:06 
GeneralRe: regsvcs on Vista SOLUTION Pin
BalasubramanianK10-Mar-09 3:28
BalasubramanianK10-Mar-09 3:28 
QuestionStop execution? Pin
Karthick_gc9-Mar-09 22:35
Karthick_gc9-Mar-09 22:35 
AnswerRe: Stop execution? Pin
BalasubramanianK9-Mar-09 23:33
BalasubramanianK9-Mar-09 23:33 
AnswerRe: Stop execution? Pin
Cybernate11-Mar-09 6:47
Cybernate11-Mar-09 6:47 
QuestionHow to close a form after some server side action is finished. Pin
Dev S9-Mar-09 21:14
Dev S9-Mar-09 21:14 
AnswerRe: How to close a form after some server side action is finished. Pin
kumar_k5089-Mar-09 21:40
kumar_k5089-Mar-09 21:40 
GeneralRe: How to close a form after some server side action is finished. Pin
Dev S9-Mar-09 22:07
Dev S9-Mar-09 22:07 
GeneralRe: How to close a form after some server side action is finished. Pin
Christian Graus9-Mar-09 22:16
protectorChristian Graus9-Mar-09 22:16 
GeneralRe: How to close a form after some server side action is finished. Pin
kumar_k5089-Mar-09 22:22
kumar_k5089-Mar-09 22:22 
AnswerRe: How to close a form after some server side action is finished. Pin
Christian Graus9-Mar-09 22:00
protectorChristian Graus9-Mar-09 22:00 
GeneralRe: How to close a form after some server side action is finished. Pin
Dev S9-Mar-09 22:06
Dev S9-Mar-09 22:06 
GeneralRe: How to close a form after some server side action is finished. Pin
Christian Graus9-Mar-09 22:14
protectorChristian Graus9-Mar-09 22:14 
GeneralRe: How to close a form after some server side action is finished. Pin
Dev S9-Mar-09 22:24
Dev S9-Mar-09 22:24 
AnswerRe: How to close a form after some server side action is finished. Pin
kumar_k5089-Mar-09 22:24
kumar_k5089-Mar-09 22:24 
AnswerRe: How to close a form after some server side action is finished. Pin
support synthesys10-Mar-09 3:19
support synthesys10-Mar-09 3:19 

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.