Click here to Skip to main content
15,912,082 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I am using tiff images in my Application. When I select the page 2 of an image and click some button which has autopostback property, again page 1(initial page of the image) will be displayed automatically. I actually want whichever page of the image I select and click any button, that page only should remain constant.
I have been referring to the following links from past 2 days, but not getting any idea.

www.alternatiff.com/scripting/[^]


www.alternatiff.com/technical.html[^]


http://www.alternatiff.com/scripting/demo.html[^]

Please any one suggest or gimme an idea on this issue.....

Regards,
Posted
Updated 12-May-11 21:01pm
v6
Comments
Sergey Alexandrovich Kryukov 13-May-11 4:44am    
Raj, I receive you call for help from a different page and would need clarification:
1) How all this is related to TIFF?
2) Do you use TIFF on client side? (Posting TIFF is fine, but do you deliver tiff to the client, like in IMG element?
3) Generally clarify your goal. If you want the same page on postback, do you mean same URL but different contents? What do you mean "page... remain constant" and what should change on click".

I cannot guarantee the answer, but let's try...
--SA
Raj.rcr 13-May-11 6:02am    
sorry for the delay SA.. Actually, I am using tiff images in my solution with help of alternatiff plug ins.. The issue is that, when I select the page 1(initial page) of a particular image and click on a button with autopostback property, which calls the image using script manager... it works fine. But, if I select page 2 and click on the same button, again the page 1 is getting displayed. Hope, u have understood the problem.
Raj.rcr 13-May-11 6:23am    
SA.. Are you busy now? Please reply as soon as possible.
Raj.rcr 13-May-11 8:45am    
Fine SA... Hoping to get ur reply.. cya

1 solution

I did used this long back to load scanned documents in web page...
You can you make a property as viewstate object type in your code behing that holds your tiff page no. and reloads it every time on postback...
 
Share this answer
 
Comments
Raj.rcr 12-May-11 2:15am    
I can try this. but can u plz gimme an example?
saxenaabhi6 12-May-11 2:51am    
put this on your code behind

protected int CurrentPageNo
{
get
{
object value = ViewState["CurrentPageNo"];
return value == null ? 1 : (int)value;
}
set { ViewState["CurrentPageNo"] = value; }
}

on your button click event on page 2, set the CurrentPageNo = 2
and in your aspx page you can do this in javascript

tiff0.GoToPage(<%= CurrentPageNo %>)


i think this should set your tiff page to page no stored in viewstate
see if that works
Raj.rcr 12-May-11 4:04am    
I have copied the property in code behind and set the CurrentPageNo = 2 in button click event. But, what the next statement does? i.e.,tiff0.GoToPage(<%= CurrentPageNo %>). where to call this??
saxenaabhi6 12-May-11 5:54am    
did you install the active-x plugin of alternate tiff in your browser.

the next line set the 'tiff0' to page 2 which is the id of the active-x object you placed in the web page.
Raj.rcr 13-May-11 3:25am    
sorry, its not working.. I followed the same as u posted.. I am really struggling a lot for this.. anyways, thanx for the help..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900