Page Viwer Webpart - change settings programatically
Last Post 05 Dec 2004 08:50 AM by BobMixon. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
sivak
New Member
New Member
Avatar

--
21 Nov 2004 08:42 PM
I am using Page Viewer webpart in my workspace. I have hardcoded the link to url.
How can we Programatically change the link of the Page viewer webpart ?

Kindly provide any sample code or references.


nrk_kiki
New Member
New Member
Avatar

--
23 Nov 2004 05:56 AM
In the 'webpart.cs' you can write :
// declaration of the PageViewerWebPart
protected Microsoft.SharePoint.WebPartPages.PageViewerWebPart cPreviewPageViewer = new PageViewerWebPart();

and in the RenderWebPart() method :

// link to the page you want / or use a string var of the url
string SiteUrl = ""
cPreviewPageViewer.ContentLink = SiteUrl;
// redim of the pageviewer
cPreviewPageViewer.Height = iFrameHeight.ToString();
// render
cPreviewPageViewer.RenderControl(output);

have a look at the SPS SDK for information on these SPS objects
good luck

Thomas Schneider
sivak
New Member
New Member
Avatar

--
23 Nov 2004 05:39 PM
Hi ,
Thanks for the info.
Can u send me the link for SPS SDK for information on these SPS objects ?


Siva
nrk_kiki
New Member
New Member
Avatar

--
25 Nov 2004 07:16 AM
Sharepoint 2003 SDK @ microsoft :
http://www.microsoft.com/downloads/...laylang=en
anuved
New Member
New Member
Avatar

--
04 Dec 2004 08:33 AM
Is there a webservice to do the same?
BobMixon
New Member
New Member
Avatar

--
05 Dec 2004 08:50 AM
Anupama,

Think for just a moment about what you are asking. A Web Service has no idea about the context in which pages are being served to users. There is no relationship between a Web Service call and a session.

Now you could write a Web Service that stored a specific URL to a configuration file then when a client requests a specific page, that URL could be read from the config file.

------------------------
Bob Mixon
http://www.sharepointblogs.com/bmixon

You are not authorized to post a reply.

Acceptable Use Policy