|
The SaveAs method will attempt to save your uploaded file to disk on the server. As such, it will accept only a legal physical path (relative or absolute) on the machine, or a network share path. For example: c:/users/me/documents/uploadedFile.txt .
If you need to move the file to an ftp server, you'll need to open a network connection and perform the ftp transfer as a separate step. Have a peek at this article[^] to get started with sending your file via ftp through code.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
both are correct...but where i define the ftp path......and this ftp obviously has username and password so,where i define the username and password.
|
|
|
|
|
You can't get there from here. Not directly.
You will need to either use an FTP library or perform the FTP transfer using the FTP protocol directly. The first option would be my recommendation. Please reference the article that I linked for you.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
yesss....i found
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
string savedir = @"\Folder\";<br />
string apppath = Request.PhysicalApplicationPath;<br />
<br />
if (FileUpload1.HasFile)<br />
{<br />
string savepath = apppath + savedir + Server.HtmlEncode(FileUpload1.FileName);<br />
Label3.Text = "Your File has Upload as" + "" + FileUpload1.FileName;<br />
FileUpload1.SaveAs(savepath);<br />
}<br />
else<br />
{<br />
Label3.Text = "Your Did not Specify a File To Upload";<br />
}<br />
}
thanks
|
|
|
|
|
Hi,
Does anybody knows how to add button to ASP.NET Wizard control,
I mean, button right or left to standart buttons (next, previous, finish)
Regards,
Alexander.
|
|
|
|
|
I have a user control with dynamically created textbox,dropdown ect..
When I try to access that .ascx controls in main page, first time it’s not taking any names and values.
But if I put break point and if navigate step by step by press f11 and f10
It’s taking all the controls name with values. Why it’s happening? How to solve this problem?
modified on Friday, March 28, 2008 9:39 AM
|
|
|
|
|
Unfortunately, there isn't a lot of information to work with in your original post, but when the question revolves around dynamic controls, the answer typically has something to do with the order of events.
Can you expand a bit on when you're creating your controls (what method), when you're attempting to access them (what method), and how you are attempting to access them? That may help to shed some light on what is causing your difficulties.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi friends
I need to get symbol using javascript.
for example if I pass £ then it should return pound symbol in alert.
Can anybody help me?
please don't forget to vote on the post that helped you.
|
|
|
|
|
think there is something in here that may help you
Just to confirm do you want to stop people passing a £ symbol through?
http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp
|
|
|
|
|
I want symbol if I enter its code.There is no any function like this.
please don't forget to vote on the post that helped you.
|
|
|
|
|
Sorry I dont understand what you mean
|
|
|
|
|
If you want to see the same thing that was pressed, then you just need to call alert with the parameter, surely ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have a gridview in which one of the columns is an ahref to another page
IS there a way in c# code I can disable the a href on a certain condition
thanks!
|
|
|
|
|
You have to make it server control using runat and make it visible true false
for example
<a id="ancr" runat="server" href='page.aspx' visible='<%#!bool.Parse(Eval("IsAutoWrap").ToString())%>' >Click Here</a>
please don't forget to vote on the post that helped you.
|
|
|
|
|
Is there no way I can disable without changing the type of format it is currently in
I have it in a templatefield at the moment, is there a way to disable it this way?
|
|
|
|
|
You can either use some inline code in the template, ro handle the databinding event and replace the cell's value
only two letters away from being an asset
|
|
|
|
|
Hi,
try to get HtmlAnchor into ItemDataBound event of gridview using "FindControl" and disable/enable it based on your condition.
Regards.
|
|
|
|
|
Hi,
I'm having a problem setting up web.config to challenge for authentication on some pages, but not others.
Here is what I'm doing:
<configuration>
...
<system.web>
...
<authentication mode="Windows" />
<authorization>
<allow users="*"/>
</authorization>
...
</system.web>
<location path="server/local" allowOverride="false">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>
I.e. i'd like to allow all users on all pages, except on all pages below the server/local directory, where I'd like IIS to challenge anonymous users for authentication. The odd thing is that this only seems to work if the parent directory of 'local', i.e. 'server' exists on disk.
The thing is, that I'm working with a custom IHttpHandler that generates pages dynamically, and uses the path to pages to decide which pages to create (not ideal, maybe, but it's something I haven't got control over). That is, neither the 'server' nor the 'local' directory exist on disk, and so pages are returned without challenge. If I manually create the directories, I suddenly get the login challenge.
So, my question is, am I doing something wrong, or is it a bug. Or is this how it's supposed to work, and if so, is there a work around?
Cheers,
Tilman
|
|
|
|
|
Hi all, I have an interest to attend for online classes with free of cost regarding asp.net, c#, vs2005, sqlserver. which are conducted by Microsoft in weekends in various cities. But i dont know the source how to attend for this?
Where i have to register for this?
Can any one knows, let me know.
I am staying at Hyderabad, Andhra Pradesh, India.
I am not knowing whether this is a correct Place to post this Message or Not ? if Not, Sorry for this post.
G. Satish
|
|
|
|
|
Hi
Has any1 come across some good articles comparing sql inline and stored procedures?
I have searched google but can only find forums where this is discussed, no actual articles
thanks
|
|
|
|
|
comparing what exactly? ease of coding? efficiency? speed?
|
|
|
|
|
Security ideally, I've seen a lot of posts in forums suggesting that inline sql isnt as secure as stored procedures
|
|
|
|
|
The term you need to google for is "sql injection[^]" as this is what makes inline sql insecure.
|
|
|
|
|
Hi,
My session is expired near about after 10 seconds.
I am using Firefox.
About Cookie Manager What should I Do for that. Should I clear the Cookies first or other solution for session not to expired.
Thanks
|
|
|
|
|
set sessionstate timeout in web.config file
|
|
|
|