Click here to Skip to main content
16,004,974 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Runtime Scrollbar in Datagrid Pin
VMSSanthosh29-Nov-06 1:51
VMSSanthosh29-Nov-06 1:51 
GeneralRe: Runtime Scrollbar in Datagrid Pin
monika_vasvani29-Nov-06 2:45
monika_vasvani29-Nov-06 2:45 
GeneralRe: Runtime Scrollbar in Datagrid Pin
VMSSanthosh29-Nov-06 17:18
VMSSanthosh29-Nov-06 17:18 
GeneralRe: Runtime Scrollbar in Datagrid Pin
VMSSanthosh29-Nov-06 17:19
VMSSanthosh29-Nov-06 17:19 
AnswerRe: Runtime Scrollbar in Datagrid Pin
indianet29-Nov-06 5:31
indianet29-Nov-06 5:31 
QuestionFolder browser object in ASP.net Pin
Suj_7829-Nov-06 0:41
Suj_7829-Nov-06 0:41 
AnswerRe: Folder browser object in ASP.net Pin
Sandeep Akhare29-Nov-06 1:09
Sandeep Akhare29-Nov-06 1:09 
AnswerRe: Folder browser object in ASP.net Pin
Sandeep Akhare29-Nov-06 1:32
Sandeep Akhare29-Nov-06 1:32 
hi i have the code for you





void Button1_Click(object sender, EventArgs e)
{




// Get the HtmlInputFile control from the Controls collection
// of the PlaceHolder control.
HtmlInputFile file = (HtmlInputFile)Place.FindControl("File1");

// HtmlInputFile file = new HtmlInput HtmlInputFile();
// file.Value="@\\hd-yogeshv\Yogesh\sample.txt";


// Make sure a file was submitted.
if (Text1.Value == "")
{
Span1.InnerHtml = "Error: you must enter a file name";
return;
}

// Save file to server.
if (file.PostedFile != null)
{
try
{
file.PostedFile.SaveAs("c:\\MyPoc\\"+Text1.Value);
Span1.InnerHtml = "File uploaded successfully to " +
"<b>c:\\MyPoc\\" + Text1.Value + "</b> on the Web server";
}
catch (Exception exc)
{
Span1.InnerHtml = "Error saving file <b>c:\\temp\\" +
Text1.Value + "</b><br>" + exc.ToString();
}
}
}

void Page_Load(object sender, EventArgs e)
{
// Create a new HtmlInputFile control.
HtmlInputFile file = new HtmlInputFile();
file.ID = "File1";

// Add the control to the Controls collection of the
// PlaceHolder control.
Place.Controls.Clear();
Place.Controls.Add(file);



}




HtmlInputFile Constructor Example



Specify the file to upload:
<asp:placeholder id="Place" runat="server">


Save as file name (no path):









QuestionHow to set dynamic tooltips using class module? Pin
JamesJM29-Nov-06 0:29
JamesJM29-Nov-06 0:29 
AnswerRe: How to set dynamic tooltips using class module? Pin
iamrashida8329-Nov-06 3:36
iamrashida8329-Nov-06 3:36 
GeneralRe: How to set dynamic tooltips using class module? Pin
JamesJM29-Nov-06 4:57
JamesJM29-Nov-06 4:57 
QuestionDatagrid problem Pin
Kissy1629-Nov-06 0:22
Kissy1629-Nov-06 0:22 
AnswerRe: Datagrid problem Pin
GaryWoodfine 29-Nov-06 11:41
professionalGaryWoodfine 29-Nov-06 11:41 
QuestionHelp! Regarding SQLDMO EnumDependencies Pin
ruparanju29-Nov-06 0:20
ruparanju29-Nov-06 0:20 
Questionhow to change the dsn name in existing crystal reports Pin
kumar2129-Nov-06 0:16
kumar2129-Nov-06 0:16 
AnswerRe: how to change the dsn name in existing crystal reports Pin
VMSSanthosh29-Nov-06 1:56
VMSSanthosh29-Nov-06 1:56 
QuestionButton click (On and Off) Pin
nannapanenikamalnath28-Nov-06 23:57
nannapanenikamalnath28-Nov-06 23:57 
AnswerRe: Button click (On and Off) Pin
Sandeep Akhare29-Nov-06 1:04
Sandeep Akhare29-Nov-06 1:04 
QuestionRedirect to a page on change in web.config Pin
Sandip Kansara28-Nov-06 23:24
Sandip Kansara28-Nov-06 23:24 
AnswerRe: Redirect to a page on change in web.config Pin
Eduard Keilholz28-Nov-06 23:56
Eduard Keilholz28-Nov-06 23:56 
GeneralRe: Redirect to a page on change in web.config Pin
Sandip Kansara29-Nov-06 0:21
Sandip Kansara29-Nov-06 0:21 
GeneralRe: Redirect to a page on change in web.config Pin
Eduard Keilholz29-Nov-06 4:16
Eduard Keilholz29-Nov-06 4:16 
AnswerRe: Redirect to a page on change in web.config Pin
GaryWoodfine 29-Nov-06 11:45
professionalGaryWoodfine 29-Nov-06 11:45 
Questionaspnet_wp and IBM Websphere MQ Pin
lijukv28-Nov-06 22:41
lijukv28-Nov-06 22:41 
AnswerRe: aspnet_wp and IBM Websphere MQ Pin
lijukv29-Nov-06 2:34
lijukv29-Nov-06 2:34 

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.