Click here to Skip to main content
15,907,910 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: error when trying to run application from the remote machine Pin
sanchet5-Oct-07 2:01
sanchet5-Oct-07 2:01 
GeneralRe: error when trying to run application from the remote machine Pin
Dhyanga6-Oct-07 20:05
Dhyanga6-Oct-07 20:05 
QuestionSorting in Repetor With Viewstate Disabled Pin
Tiger4565-Oct-07 0:41
Tiger4565-Oct-07 0:41 
AnswerRe: Sorting in Repetor With Viewstate Disabled Pin
Christian Graus5-Oct-07 0:43
protectorChristian Graus5-Oct-07 0:43 
GeneralRe: Sorting in Repetor With Viewstate Disabled Pin
Tiger4565-Oct-07 1:11
Tiger4565-Oct-07 1:11 
GeneralRe: Sorting in Repetor With Viewstate Disabled Pin
Christian Graus5-Oct-07 1:17
protectorChristian Graus5-Oct-07 1:17 
GeneralRe: Sorting in Repetor With Viewstate Disabled Pin
Tiger4565-Oct-07 5:24
Tiger4565-Oct-07 5:24 
QuestionDisplaying the images from the Database Pin
.NET- India 5-Oct-07 0:32
.NET- India 5-Oct-07 0:32 
Hello Everyone,

I've stored the images in my database and now i want to display those images in my web page and i'm using the code given below for displaying it.....

But the compiler throwing an error

Invalid Parameter at Bitmap bitmap =new Bitmap(stream) line

plz try to understand my code and suggest me some way to come out of this.......

MemoryStream stream = new MemoryStream ();
SqlConnection connection = new SqlConnection (@"server=.;database=kiritbhai;uid=sa;pwd=");
try
{
connection.Open ();
SqlCommand command = new SqlCommand ("Select ImageFile from Rough_Images", connection);
byte[] image = (byte[]) command.ExecuteScalar ();
stream.Write (image, 0, image.Length);

Bitmap bitmap= new Bitmap (stream);
Response.ContentType = "image/gif";
bitmap.Save (Response.OutputStream, ImageFormat.Gif);



}
finally
{
connection.Close ();
stream.Close ();
}
AnswerRe: Displaying the images from the Database Pin
Christian Graus5-Oct-07 0:37
protectorChristian Graus5-Oct-07 0:37 
GeneralRe: Displaying the images from the Database Pin
.NET- India 5-Oct-07 1:28
.NET- India 5-Oct-07 1:28 
GeneralRe: Displaying the images from the Database Pin
Christian Graus5-Oct-07 1:33
protectorChristian Graus5-Oct-07 1:33 
QuestionTrying to attach db's Pin
bhattiprolu5-Oct-07 0:29
bhattiprolu5-Oct-07 0:29 
AnswerRe: Trying to attach db's Pin
Paras Kaneriya5-Oct-07 0:30
Paras Kaneriya5-Oct-07 0:30 
GeneralRe: Trying to attach db's Pin
bhattiprolu5-Oct-07 0:41
bhattiprolu5-Oct-07 0:41 
GeneralRe: Trying to attach db's Pin
Christian Graus5-Oct-07 0:47
protectorChristian Graus5-Oct-07 0:47 
GeneralRe: Trying to attach db's Pin
bhattiprolu5-Oct-07 0:50
bhattiprolu5-Oct-07 0:50 
GeneralRe: Trying to attach db's Pin
Christian Graus5-Oct-07 1:05
protectorChristian Graus5-Oct-07 1:05 
GeneralRe: Trying to attach db's Pin
bhattiprolu5-Oct-07 1:41
bhattiprolu5-Oct-07 1:41 
AnswerRe: Trying to attach db's Pin
Christian Graus5-Oct-07 0:31
protectorChristian Graus5-Oct-07 0:31 
QuestionResize textboxes Pin
Zoltan Aszalos5-Oct-07 0:27
Zoltan Aszalos5-Oct-07 0:27 
AnswerRe: Resize textboxes Pin
Christian Graus5-Oct-07 0:36
protectorChristian Graus5-Oct-07 0:36 
QuestionSelect evet fires twice using ObjectDataSource GridView [modified] Pin
Nimua5-Oct-07 0:08
Nimua5-Oct-07 0:08 
QuestionIssue related with URL Pin
Malayil alex5-Oct-07 0:05
Malayil alex5-Oct-07 0:05 
AnswerRe: Issue related with URL Pin
Christian Graus5-Oct-07 0:07
protectorChristian Graus5-Oct-07 0:07 
AnswerRe: Issue related with URL Pin
N a v a n e e t h5-Oct-07 0:17
N a v a n e e t h5-Oct-07 0:17 

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.