|
The image type is a image/pjpeg. I tried this too and it did not work.
Response.ContentType = dr["ImageType"].ToString();
Response.Expires = 0;
Response.Buffer = true;
Response.Clear();
Response.OutputStream.Write((byte[])dr["ViewImage"], 0, Convert.ToInt32(dr["ImageSize"].ToString()));
Response.End();
|
|
|
|
|
Anita_Kamat_inds wrote: Convert.ToInt32(dr["ImageSize"].ToString()));
Wow - that makes sense.
Did you try writing the bytes to the file system and seeing if they are really a jpeg ? Have you tried more than one image from your DB ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'm trying to get the AJAX timer control to work. There is a very simple example of this found here:
http://www.asp.net/ajax/documentation/live/tutorials/IntroToTimerControl.aspx
I followed the example yet the timer event never fires. What am I missing?
I'm using VS2005.
|
|
|
|
|
Your code is broken ? Is there a download with the sample, and if so, have you tried that ?
Why do people need the AJAX library just to put a timer in their pages ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I do not want to use AJAX. How can a incorperate a timer on a page without AJAX?
Please refer to the link in the orginal question for the sample code.
|
|
|
|
|
AJAX is just javascript. AJAX exists without the stupid Microsoft AJAX toolkit. There is only one way to have a timer on a page - with javascript. The AJAX toolkit is just wrapping a very basic web dev task for you.
[^]
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for that info. Can you point to a javascript timer example?
|
|
|
|
|
The ^ in my post is a link. Sorry, I dunno what happened, I just pasted and CP auto formatted, I must have hit space or something, I expected you'd see the URL as well as the ^ for a new window.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: Why do people need the AJAX library just to put a timer in their pages ?
Did I miss the CP announcement that today was Rhetorical Question Day?
The answer is that AJAX solves everything. One day it will discover the body of Jimmy Hoffa. I believe it will be found on an as yet undiscovered computing cloud.
|
|
|
|
|
led mike wrote: The answer is that AJAX solves everything. One day it will discover the body of Jimmy Hoffa
ROTFL !!!
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
|
I have generated dynamic database table in
which the colums will vary as per the selection
by the end user. Now, if my table name is car which
i have generated dynamically on the button save click
event it will have its colums like: colour, gears etc.
So can i generate a dynamic form by taking the cars id
and its column name as the textbox controls on the new
form. The new generated form will also have the basic
funtionality of add, edit,delete etc. If my table is car
then to generate dynamically car.aspx form or if table
is computer then
computer.aspx should be generated.
|
|
|
|
|
Sounds messy to me. I'd think you want to rewrite the URL, and have a common page that gets pointed to at the end of the day.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
I have been scratching my head on this for days, but getting no where!
Using visual basic and a sqldatasource for my gridview, I need change the colour of a gridview row backcolour plus set a hidden checkbox to checked when the user clicks on an image button. I also need to grab a field value from a row in the gridview.
Now, everything works when I am on the first page, but when I page to the next page I get the following error message "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index".
My image buttons are connected to an onrowcommand in the gridview tag, which checks to see which image button has been called, gets the row number and then calls the appropriate method for that button.
Does anyone have a solution to set a hidden checkbox over a number of pages, grab a field value from the gridview and change the row back colour?
Thanks
|
|
|
|
|
If it works only on the first page, I guess you should post some code so we can look at it.
I'd never use a SQLDataSource tho, that stuff blows.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
I have managed to crack the problem in so far by adding an onclick event to the image button, but if I page back the grid is refreshed and in turn the rows that have been clicked upon are changed back. Therefore, slightly modified question - how do you maintain those rows with post back?
Thanks
|
|
|
|
|
You need to store the selected page somewhere ( on the URL perhaps ) so you load the correct page when you do a postback.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Sorry, can you explain to me how you would this? I am not clear on what you mean.
|
|
|
|
|
Ideally, the control does no paging and you just pass it the data for the selected page. But, either way, however you get the data for page 2, say, what is needed is to store the selected page number so you can select that data on your postback. Perhaps a better idea is to look at the code that does the selecting, and just keep the data you had before, which will be in viewstate./
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
I am developing a website using Visual Basic and NetFramework 3.5, and for my gridview I would to have a custom sort.
What I am looking for to control the sort on the columns. Therefore, if a user clicks on a column and puts into order, and then clicks another column, then the first column should remain in the sort order it was put by the user. However, I need to repeat this pattern over at least 3 columns.
Can anyone help me, please? I have tried every where for an answer.
|
|
|
|
|
Hi,
I have one application. I want to call method in that page again and again while Records are deleted. There are near about 10000 records in that table.
OR should I use multiple threading if yes then how can I write.
Thanks
sjs
|
|
|
|
|
sjs4u wrote: How to call page using webservice
Maite, page calls a webservice and not the vice versa.
sjs4u wrote: I want to call method in that page again and again while Records are deleted
Use some kind of loop.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
but if I write code in that webservice should it will run background till the condition complete.
I have 10000 records and I want to distribute in 300 and call that function again and again till it reach to 10000.
bucause my page is expired though I write and configure all the setting for page expired. I want to increase the access to that records.
|
|
|
|
|
sjs4u wrote: but if I write code in that webservice should it will run background till the condition complete
No.
For that you can simply use AJAX Implementation.
Cheek Some sample from W3School
sjs4u wrote: I have 10000 records and I want to distribute in 300 and call that function again and again till it reach to 10000.
I don't think there is any use of loading 10,000 records in a page. Use Filter to minimize the records that would also helps you to improve performance.
sjs4u wrote: bucause my page is expired though I write and configure all the setting for page expired. I want to increase the access to that records.
My suggestion try to minimize the records in a single time.
Good Luck
|
|
|
|