|
Dude ..
byte[] photo = (byte[])dr[0];
MemoryStream ms = new MemoryStream(photo);
//Image im = new Image();
//Icon.ImageUrl =
Bitmap bt = new Bitmap(ms);
....> Response.OutputStream.Write(photo, 0, photo.Length);
here dr is a data row
take a aspx page ... in that write this code
Now to the image control add the image url as the aspx page
This will work
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
thanks for u r coding krazy... but i m getting error Invalid attempt to read when no data is present.
my code:
conn.Open();
cmd = new SqlCommand("SELECT my_image from test123",conn);
dr = cmd.ExecuteReader();
byte[] photo = (byte[])dr[0];
MemoryStream ms = new MemoryStream(photo);
Bitmap bt = new Bitmap(ms);
Response.OutputStream.Write(photo, 0, photo.Length);
|
|
|
|
|
Not sure what the other dude gave you, looks like a mess to me.
You write a HTTP handler, and it does the response.binarywrite. I'm sure there are examples here on CP
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanks for u r reply chris...
can i get a sample coding atleast?
since i m not familiar with http process and imaging
|
|
|
|
|
http://www.codeproject.com/KB/web-image/thumbnailer.aspx[^]
seems like a place to start.
But, it's really as simple as placing the code you have, in a HTTP handler, and doing what I said.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
|
i am using the following code in page load event
<br />
dim CurrentPageURL<br />
<br />
CurrentPageURL= Request.UrlReferrer.ToString()<br />
is it correct?
|
|
|
|
|
Trial and Error?
Response.Write("URL I'm Testing: " + CurrentPageURL);
-= Reelix =-
|
|
|
|
|
Hello Friends
i m working on gridview.
my gridview is consist of two dropdown and six textbox in a row.
now at runtime i want to disabled 1 column textboxes.
how can i do that..
if anybody knows pls respond...
thanks
|
|
|
|
|
Hi Ankit,
what do you mean by disable the grid view? by default all the cell are readonly. only the time of editing in grid view all the text box will become editable.
so do you need it at the time of edit of grid view or what ?
please clear .
Thanks !!!!
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
hi Abhijit
actually my gridview is not binded with any data
it is blank.
and at runtime the textbox of one column i want to disabled..
how can i do it.
the gridview i m using is for the getting data to fed up into database.
any idea
thanks
|
|
|
|
|
you can get the control using FindControls() methods.
try to find the control of rows like
textbox t= (textbox)gridviewRow.findControl("txtbox1");
t.Enabled=flase.
kinldy check the syntax . This the way that you can acheive.....
Good luck....
let me know when done
Thanks !!!!
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
hi Abhijit
thanks
u Have given right answer to my question it is working..
thanks again
|
|
|
|
|
you are welcome !!!
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
hai,
currently i m using asp.net with c# (.net 2005, 2.0 framework)
here i would like to display the records which is fetched from database (in gridview).
while user update a particular record, the columns which is affected should be shown in a different color in gridview.
how to achieve it?
for example,
consider the below as Columns and values in a table (sql server 2000)
rollno:1
name:codeproject
site:www.codeproject.com
status:famous
and after user updation the above record changed as...
rollno:1
name:codeproject
site:www.codeproject.com
status:too famous
The gridview should display all values and the "too famous" should have a different background (since its updated) (this process will continue for many values)
how to achieve this? - KARAN
Note : the update and gridview are in separate page.
|
|
|
|
|
I have set up a virtual directory on ISS 6.0 to store the all .jpg and .swf
files which i use in my project
It is alias name is "OutSrc"
Is it possible to acquire a list of files which exist in that virtual
directory ?
For my default project directory, i can get list of the specific files like
that;
*******************
DirectoryInfo drc = new DirectoryInfo("~/banners");
FileInfo[] FileLst = drc.GetFiles("*.swf");
*******************
But, how about for the virtaul directory, Is there a way to do this?
Thanks,
N/A
|
|
|
|
|
you can use the HttpContext.Current.Server.MapPath("~/banners") to get the physical directory.
|
|
|
|
|
try to find the files from the physical location.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Is
DirectoryInfo drc = new DirectoryInfo(@"C:\IIS\SiteHere\banners");
not possible?
-= Reelix =-
|
|
|
|
|
Hi Everyone,
I'm running into a major problem with the combobox created by bestcomy. I also posted a comment on that article but its also very urgent so I thought I would try here as well. I recently had to re-install VS studio 2002 on my laptop and the code that I had to run the combobox created by bestcomy is no longer working. I'm getting this error:
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Method LoadPostData in type Bestcomy.Web.UI.WebControls.ComboBox from assembly LoadPostData does not have an implementation.
Source Error:
Line 187: <td class="heading" width=135px>Central Office:</td>
Line 188: <td width=220px>
Line 189: <bestcomy:ComboBox id="ddlCO" runat="server" Width="120px" AutoPostBack="true" ></bestcomy:ComboBox>
Line 190: </td>
Line 191: <td>
Has anyone seen anything like this before? Any help would be greatly appreciated. thanks!
|
|
|
|
|
|
I did. I mentioned in my message that its posted there but no one is responding.
|
|
|
|
|
This is still frowned upon. Also, please read the forum guidelines--messages with 'urgent' tend to get avoided.
|
|
|
|
|
Hi all,
I have a span server control (runat = server), the content of the control are set initialy to "1:00" which means 1 minute.
I have a javascript that counts down every second and writes the time in the span control, so it writes:
"0:59"
"0:58"
.
.
.
"0:00"
when the time reaches 0:00, I do an automatic postback of the page, but when I read the contents of the span.innerText it reads "1:00", which means that the changes to the "innerText" done by javascript wasn't preserved.
what's the problem? and what's the solution?
Thanks
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|