C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




how to call html control in codebehind


Posted Date: 05 Sep 2008      Total Responses: 2

Posted By: sujit kumar biswal       Member Level: Gold     Points: 1


i have one html page not .aspx,its a simple html page where i ve different control for input user data like name,address etc.in that page there is one control to upload file.when m writing code to access the controls from that i'm able to access all controls but m not able to access the file upload control.

in html page <input id="File1" runat="server" type="file"> is the file upload control

when m trying to access this m not getting plz any one tell
m trying to access the control in this code to upload file

upload=System.IO.Path.GetFileName(File1.PostedFile.FileName);




Responses

Author: vipul    05 Sep 2008Member Level: DiamondRating:     Points: 2
hi,
first of all you can't used System.IO.Path.GetFileName(File1.PostedFile.FileName); in the html page because this class is used only in the .net file . for uploading file from html page you used. For that you refer this document
http://www.cs.tut.fi/~jkorpela/forms/file.html


vipul,
http://dongavipul.blogspot.com


Author: Athira Appukuttan    05 Sep 2008Member Level: DiamondRating:     Points: 3
<input id="fuupload" type="file" runat="server" /><asp:Button ID="Button1" runat="server"
Text="Button" OnClick="Button1_Click" />

using System.IO;
string file = Path.GetFileName(fuupload.PostedFile.FileName);

Try like this




Post Reply
You must Sign In to post a response.
Next : Disabling Main Menu Item Click
Previous : stored procedure
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

budget conference call

Contact Us    Privacy Policy    Terms Of Use