Click here to Skip to main content
15,892,005 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionResponse.Redirect behavior Pin
AnalogNerd10-Dec-12 9:11
AnalogNerd10-Dec-12 9:11 
AnswerRe: Response.Redirect behavior Pin
David Mujica10-Dec-12 10:01
David Mujica10-Dec-12 10:01 
GeneralRe: Response.Redirect behavior Pin
AnalogNerd10-Dec-12 10:16
AnalogNerd10-Dec-12 10:16 
AnswerRe: Response.Redirect behavior Pin
Shameel10-Dec-12 21:28
professionalShameel10-Dec-12 21:28 
AnswerRe: Response.Redirect behavior Pin
AmitGajjar11-Dec-12 6:54
professionalAmitGajjar11-Dec-12 6:54 
AnswerRe: Response.Redirect behavior Pin
ZurdoDev12-Dec-12 4:36
professionalZurdoDev12-Dec-12 4:36 
GeneralRe: Response.Redirect behavior Pin
AnalogNerd12-Dec-12 4:46
AnalogNerd12-Dec-12 4:46 
QuestionERROR while updating image in database Pin
Ani199110-Dec-12 6:18
Ani199110-Dec-12 6:18 
when i m trying to update image in sql database i m getting error as"Cannot bulk load. The file "System.Byte[]" does not exist."
my code is as follows.pls help.
protected void Button1_Click(object sender, EventArgs e)
{
{
if (FileUpload1.HasFile)
{
byte[] productImage = FileUpload1.FileBytes;


string constr = "Server=AOD257; Database=Edusocial;User ID=sa; Password=password";
string query = "UPDATE Profile SET [Pic] = (SELECT Pic.* from Openrowset(Bulk '" + productImage + "', Single_Blob) MyImage) where Id =11651658";

SqlConnection con = new SqlConnection(constr);
SqlCommand com = new SqlCommand(query, con);
com.Parameters.Add("@Pic", SqlDbType.Image).Value = productImage;

con.Open();
int result = com.ExecuteNonQuery();

con.Close();

if (result > 0)
{
Response.Redirect("Default.aspx");
}
}
else
{
lblmessage.Text = "Please Select Image File";
lblmessage.Visible = true;
}
}

}
GeneralRe: ERROR while updating image in database Pin
jkirkerx10-Dec-12 10:37
professionaljkirkerx10-Dec-12 10:37 
GeneralRe: ERROR while updating image in database Pin
Ani199110-Dec-12 21:15
Ani199110-Dec-12 21:15 
GeneralRe: ERROR while updating image in database Pin
Richard Deeming11-Dec-12 0:54
mveRichard Deeming11-Dec-12 0:54 
GeneralRe: ERROR while updating image in database Pin
jkirkerx11-Dec-12 7:26
professionaljkirkerx11-Dec-12 7:26 
Questionmaking a class with streamreader thread safe - perhaps using monitor or a singleton Pin
jkirkerx9-Dec-12 11:45
professionaljkirkerx9-Dec-12 11:45 
GeneralRe: making a class with streamreader thread safe - perhaps using monitor or a singleton Pin
jkirkerx9-Dec-12 16:14
professionaljkirkerx9-Dec-12 16:14 
QuestionDisplay Images from a database in a tile view Pin
Member 94655649-Dec-12 5:42
Member 94655649-Dec-12 5:42 
AnswerRe: Display Images from a database in a tile view Pin
Ali Al Omairi(Abu AlHassan)10-Dec-12 2:23
professionalAli Al Omairi(Abu AlHassan)10-Dec-12 2:23 
Questionlinq connection in asp.net Pin
JonBrynjar8-Dec-12 3:58
JonBrynjar8-Dec-12 3:58 
AnswerRe: linq connection in asp.net Pin
AmitGajjar11-Dec-12 7:00
professionalAmitGajjar11-Dec-12 7:00 
QuestionChange root path Pin
#realJSOP8-Dec-12 3:40
mve#realJSOP8-Dec-12 3:40 
AnswerRe: Change root path Pin
Richard Deeming10-Dec-12 1:35
mveRichard Deeming10-Dec-12 1:35 
GeneralRe: Change root path Pin
#realJSOP10-Dec-12 1:42
mve#realJSOP10-Dec-12 1:42 
AnswerRe: Change root path Pin
AmitGajjar11-Dec-12 7:10
professionalAmitGajjar11-Dec-12 7:10 
QuestionUpdating the column using entity framework Pin
indian1437-Dec-12 12:46
indian1437-Dec-12 12:46 
Questionasp.NET composite control cannot raise an event Pin
michal.cerbak7-Dec-12 4:50
michal.cerbak7-Dec-12 4:50 
Questionhow to convert hex to rgb color code in asp.net Pin
Deenuji6-Dec-12 23:14
Deenuji6-Dec-12 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.