TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
hameed
NA
28
19.1k
open file dialog box problem in web application aspx page
Sep 15 2010 12:35 AM
I am able to open the open file dialog box with this code.Its working fine with this code...
OpenFileDialog fDialog = new OpenFileDialog();
[STAThread]
protected void Button1_Click(object sender, EventArgs e)
{
Thread MyThread = new Thread(ThreadMethod);
MyThread.SetApartmentState(ApartmentState.STA);
MyThread.Start();
}
public void ThreadMethod()
{
fDialog.Title = "Image";
fDialog.Filter = "Image|*.jpg;*.jpeg;*.gif;*.png";
string dir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
fDialog.InitialDirectory = dir;
fDialog.Multiselect = true;
fDialog.AddExtension = true;
fDialog.CheckFileExists = true;
fDialog.CheckPathExists = true;
fDialog.DereferenceLinks = true;
fDialog.ValidateNames = true;
fDialog.ShowHelp = true;
fDialog.AutoUpgradeEnabled = true;
fDialog.RestoreDirectory = true;
DialogResult dr = this.fDialog.ShowDialog();
}
My problem is..when i click the button.the fileopen dialog box opens back to web page...how to bring that control infront of web page...any idea please help me out.only in web application
Reply
Answers (
1
)
how to store excel data into database by file upload in c# language
Import Excel File And Show in DatatGridView without using Oledb