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
Avinash Yoganand
NA
42
70.8k
Browse and upload files in windows application
Mar 8 2011 12:18 AM
i have a application wherein i have a browse button. when i click tht button it says index outofrange exception. i want to search for the file add that file to the form and mail through the windows form. sending mail through the form is working fine.
this is my code in the browse button click code:
private void btnBrowse_Click(object sender, EventArgs e)
{
OpenFileDialog fdlg = new OpenFileDialog();
fdlg.Title = "MyComputer Open File Dialog";
fdlg.InitialDirectory = "C:\\";
fdlg.Filter = "All files(*.*)|*.*|All files(*.*)|*.*";
fdlg.RestoreDirectory = true;
txtAttachment.Text = fdlg.FileName;
//mail.Attachments.Add(new Attachment("C:\\Users\\Avinash\\Documents\\Desktop\\total_police_station_numbers.txt"));
}
please help me in this regard.
Thanks in advance,
Avinash
Reply
Answers (
4
)
How can i handle TabIndex changed in Datagridview
parser