-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Fileupload code
PostPosted: Wed Apr 20, 2011 2:15 am 
Newbie

Joined: Wed Apr 20, 2011 12:35 am
Posts: 2
Hi all,
How to write the following code by using NHibernate

SqlConnection con=new SqlConnection("Data Source=inndocs3;Initial Catalog=yvk;Persist Security Info=True;User ID=sa;Password=inndocs");
SqlCommand cmd=new SqlCommand();
cmd.Connection=con;
cmd.CommandText="insert into userinfo values('"+textbox1.Text+"','"+fileupload1.FileName+"')";
fileupload1.PostedFile.SaveAs(Server.MapPath(".") + "\\" + fileupload1.FileName);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
t1.Text = "";
Response.Write("<H1> File saved</H1>");


plz help me
Thnak you


Top
 Profile  
 
 Post subject: Re: Fileupload code
PostPosted: Wed Apr 20, 2011 7:43 am 
Beginner
Beginner

Joined: Mon Apr 04, 2011 3:31 am
Posts: 41
hi

Try this Way

File Upload

_________________
Thanks
Niki


Top
 Profile  
 
 Post subject: Re: Fileupload code
PostPosted: Wed Apr 20, 2011 7:44 am 
Beginner
Beginner

Joined: Mon Apr 04, 2011 3:31 am
Posts: 41
hi

Try this Way

File Upload

I dont know about this link ...
its might be used checked anyway

_________________
Thanks
Niki


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.