.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

XML Viewer web part and current page URL

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :SharePoint
Hi, I am using XML viewer web part in 2010. Is it possible to get the current page URL in my XSLT ?  Tried to get this working using a javascript call, but ended up with "scripting is disabled" error. Please suggest. -Karthik  

View Complete Post

More Related Resource Links

Is it possible to give parameter to the Page Viewer web part?

Page viewer web part gives iView to the website eg. http://www.test.com. This works fine! Our customer would like give parameters like http://www.test.com/abc?name=John. First question is that is it possible to give personalized parameters to the url? Any chances to give SharePoint user name as parameter?  Kenny_I

Prompt for "File Download" on Page Viewer Web part pointing to .htm file

I am in the process of moving my 2007 site over to 2010. On some of my sites I have a page viewer web part that points to a .htm file. It works great in 2007, but in 2010 I get a "File Download" prompt. Any ideas? Thanks --tolga

Web Part Page doesn't show current navigation

Hi! I'm having a problem with the navigation of web part page in Sharepoint 2010. For starters I need to say that I am a web designer and learning to brand Sharepoint 2010 wich means I'm not that tech-savvy so bear with me. We have created an intranet publishing site with Sharepoint 2010 and I have designed a custom master page with styles through Visual Studio 2010. The intranet site looks fine with the new design and I got navigation working with fly out menus, semantic subpages etc. The problem is: when I create a normal page the current sub-navigation is shown and it even shows my created web part page and all is fine, but once I go to this web part page, the left/sub-navigation disappears and I have no idea how to bring it back. The web part page uses the same master file as every other page. Everything with the the layout stays the same as my masterpage, except for the menu wich disappear so I thought it might be some property missing on the sub-navigation. Or do I need to edit something in the web part page layout in the gallery?: Master Page Gallery > BlankWebPartPage.aspx If so can I do it from Visual Studio? Here is the code for the left navigation menu: <!-- styles needed to have left nav to the left of the main area --> <div id="s4-leftpanel" class="s4-notdlg"> <!-- The quick launch bar / left navigation

Page Viewer Web Part - with transparent background?


Hi all, this should be an easy one I hope...

I have a simple page with 1 Page Viewer Web Part that points to a simple app on another website. (basically an IFrame). My portal has a tiled image background, but the application is showing up with a white background.

My question is, is there a simple way to get the web part to have a transparent background, so that my portal background shows up behind it? So that it will look more natural, instead of a white square in the middle of my portal page...

note - the background is transparent in Firefox 3.5.9 for Windows XP, but not in IE8... unfortunately everyone here uses IE8

Page Viewer Web Part question


Dear collegs ,

I have one question and hope that you can help me.

Namely, I added one Page Viewer Web Part to one SharePoint web page. Before that on my IIS I created one local web site with this link : http://localhost/Test/Home.html.

Inside my Page Viewer Web Part first I chosee Web Page and than in field Link enter link from my IIS : http://localhost/Test/Home.html.

When I open that SharePoint page than inside SharePoint I got http://localhost/Test/Home.html what is good.

That IIS web site have more pages, for example page Customer1 with the link http://localhost/Test/Home/Customer1.html.

What I would like to ask you, is possible from outside to open Page Customer 1 (http://localhost/Test/Home/Customer1.html ) inside Page Viewer Web Part without that must first open http://localhost/Test/Home/Customer1.html.

Other words, when click on some link to open directly Customer1 web page inside above created Page Viewer Web Part.



How to import SQL Server Reporting Services Report Viewer Webpart on web part Page using code in Sha


Hi Every One,

I have use SQL Server Reporting Service in SharePoint integrated mode. I have deployed all reports and data source in SharePoint Document Library using CODE. I need to show those report in “SQL Server Reporting Services Report Viewer” Web Part on Web Part Page, I have created Web Part page by code. But I cannot import this Web Part on Page using Code.

How I can do this by code.


Navaratan Sharma

Knowing the event occured in user control in current page




      My web application has user control which uses third party controls called Devexpress controls. The user control is a menu  and is part of the Master page. It is placed there because this needs to be available in all the pages. My user controls raises a even on item clicked. Now, My question is that Is there any way to know that the event has occurred in page_load of the current page in which I am in?

Change part of a page without full postback


I have a page with two columns. Initially, the left column will contain a list of links that are article titles. Clicking on one of the links will display the text of the article in the right column, keeping the list of titles in the left column. Clicking on another title will clear the text of the first article and display the second. Is there a way to accomplish this without having to repaint the whole page? I would rather not have the whole page resent each time a title is clicked, but rather have the page stay as is and only the contents of the right column get cleared and redisplayed. I assume there's a way to do this with JavaScript, but I don't know how and would appreciate some help. Thanks!

how to add a wiki page as a web part


Hi All,

I have created a feature that generates a page and adds a content editor web part, links web part (using elements.xml). Everything works fine but I would like to replace content editor web part with a wiki page that I am going to create.

For example, I copied an excerpt from elements.xml file that adds a content editor web part for the page.

<Module Path="Dependencies/Pages" Url="">
  <File Url="default.aspx" Type="Ghostable">
   <!-- Add the Rich Content Text Editor web part -->
   <AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
          <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" xmlns:iwp="http://schemas.microsoft.com/WebPart/v2/ContentEditor">
            <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
            <Title>Executive Summary</Title>

 Can someone tell me how I can add a wiki page using manifest (elements.xml) file or some other way?

Add page numbers for paging in data view web part


Hello all,

Has anyone found a solution that will allow me to have page numbers for paging in a data view web part. For instance, if I have 40 items/rows and I set the paging to display 10 items, I'd like the paging to show 1 2 3 4 rather than showing 1-10 and having to click next over and over to get to a specific item.

I found this article, but it is for 2003 and doesn't seem to apply to 2007 or if it does I am not able to really figure out how.


Please help!

Thanks in advance.


Web Part working fine on the top-level page but 'Not Safe' error on lower-level pages.


I have created a Web Part which reads and parses the SharePoint logs in order to display usage information of the page it resides on.  The Web Part works perfectly on the top page, reading and displaying the information desired.  However, once the Web Part is added to any page lower in the site heirarchy (sub-page) the same Web Part throws the following error:

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Show Error Details
Hide Error Details

[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.]
  at Microsoft.SharePoint.ApplicationRuntime.SafeControls.GetTypeFromGuid(Guid guid)
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts)

Of course the current version of the Web Part is in the SafeControls list on the web.config.

The Web Part was originally designed to return site activity only for the top default.aspx page and worked fine but started to fail in the manner described above once I added the following line of code to return a SPCo

Microsoft Report Viewer control to display data on one page


Hello everyone,

I am wondering if the Microsoft Report Viewer control allows for display changes.  Say for instance a user wants would like to see all the data requested then another time would like to toggle thru the pages of infomation.  So does anyone know if the control allows for display changes from complete view to paginated viewing.  I am using MS VS 2008 with ASP.NET 3.0.  Thanks for your response.


How to get current page file name?


I am trying to get the current page file name that i access to.
Lets say i am at test.aspx page, i want it to return me "test" file name.
I tried to use this.Page.toString(), it returned me "ASP.test_aspx" which is like half correct....
but i would like to get only "test".

2nd question, this.Page.toString() will always return me in a format of ASP.[filename]_[fileextention]?
If that's the case, maybe i can use splilt function to get the file name i want if there aren't any better solution than that.



Adding a list item that populates a particular part of a page

I am trying to create a list view in sharepoint designer that when you enter a list value it populates the right part of the page. Background - I am creating a list for a marketing newsletter that when you fill out the list form it will populate the marketing newsletter on page. its to save recreating it every month. the list has drop downs for addition and department and the data is inserted on the page. thanksSharepoint Customiser

image is showing in sql image viewer,but in aspx page it is not getting

dears , in sql 2005 table i created an image columnin that image colum i inserted an image in hex format. data like as follows.0xFFD8FFE00104A4649460110010100FFDB0430C88A88CAAACCCE101C121010101022181A141C28222A28262226262C303E342C2E3A2E2626364A363A40424646462A344C524C44503E444642FFDB0431CCC10E1020121220422C262C4242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242FFC401F001511111100000000123456789ABFFC40B5100213324355440017D12304115122131416135161722711432813FA182342B1C11552D1F0243362723F9A161718191AD25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3FA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC401F103111111111000000123456789ABFFC40B5110212443475440127701231145213161241517617113223281814423FA1B1C19233352F0156272D1A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A7374D75767778797A3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3FA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFC0011807803F3121021113111FFDD0402FFDA0C31021131103F0A6B1D43F3A42B0E03FED3F3F63FFD0685A5DB5216176D1B69058FFD15DB46DA80DB49B6811FFFD24D3F3F2A434AD46C9408FFFD38D52A511D21D3F8E97CBA763FFD43F651B2A4A176D1B698FFD53F6D1B6A61B28D94058FFD63F65

Sharepoint 2010 - RSS Viewer Web Part has some AJAX issues

Hi, I've this problem in RSS Viewer. If you select the "Enable Asynchronous Automatic Refresh?" checkbox, the Web Part will not render properly, but will give an error: "An unexpected error occured while rendering the webpart." Anybody ever had this problem? Tks,

How to authenticate automatically to the external portal from Page viewer?

Page viewer web part gives iView to the website eg. http://www.test.com. This works fine! Our customer would like login to the external portal with attaching user name in the ur like http://www.test.com/abc?name=John. Or user single sign on to login to the external portal. Authentication to the external system should be automatical to the end-user so that they don't have to login manually to the www.test.com portal. How to do it?Kenny_I
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend