.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

having problem opening up pages correctly from web part

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :SharePoint
Hi all, I have a SL4 application that I'm trying to deploy as a webpart in Sharepoint 2010. To give you a background -- the SL project name is MyStuffApp. And there's a designated test page project called MyStuffApp.Web. Now, MyStuffApp has 2 different xaml pages, page1.xaml and page2.xaml. I've added two aspx pages on MyStuffApp.Web called page1.aspx and page2.aspx to respectively host the two xaml.  When I run the application, page1.aspx opens up. It has a hyperlinkbutton on it, which when clicked, opens up pag2.aspx. I've properly managed this on App.xaml.cs as well.  Now my problem is -- when I deploy the project as a web part, I can see page1.aspx. But when I click on that hyperlinkbutton, it doesn't display the content of page2.aspx, and I instead get the standard IE error "cannot display the webpage".  Can someone help me troubleshoot the issue? I'm very new to web parts, so I'm trying to learn things step-by-step.    Thanks.  

View Complete Post

More Related Resource Links

SharePoint Application and Site Pages - Part 1 of 2

In this first part of the two part series, Steven covers the differences between Site and Application pages in SharePoint 2007, why each may be used in various circumstances, and prepares for the construction of a menu located application page. After a brief introduction he examines the concept of Site Pages and Application Pages separately in detail with supported screenshots.

SharePoint Application and Site Pages - Part 2 of 2

As the second article in a two part series, Steven examines the attributes and details of a SharePoint 2007 application page, including the construction and feature deployment of the same page based project. Since this is a WSS level objective, as opposed to MOSS, you will not need MOSS to work with the code included in this project. Windows Server 2003, WSS, and Visual Studio 2005 are all that is needed, with no additional add-ons. He provides a detailed analysis of each step involved in the creation and deployment of the project.

Cutting Edge: Subclassing and Overriding ASP.NET Pages-Part I


There are a number of techniques that allow you to modify a running ASP.NET page without touching its source code. Dino discusses some this month.

Dino Esposito

MSDN Magazine April 2007

Problem opening dotnet 1.1 projet on 2008 web server


 We recently upgraded to a 2008 development web server and I installed all the stuff to get dot net 1.1 app working on the server.  I can host them and they work.  My problem is that when I try to open one in VS 2003 I get the following error.  I set up the web server the same as my previous one, and I think a long time  ago I got this error when we set up current one but do not remember how to resolve it.  So I moved my project files from the old server to the new server and then I get these errors. 


The web Server reported the following error when attempting to create or open the Web Project located at the following url: Http://localhost:/MobTracker. 'Http/1.1 500 server error

SharePoint Calendar Error: The "ListViewWebPart" Web Part appears to be causing a problem. Index was

In one specific SharePoint calendar, on one specific week in that calendar when we select the "more items" link in the monthly view (or the expand all option) we get the following error:
The "ListViewWebPart" Web Part appears to be causing a problem. Index was outside the bounds of the array.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
Troubleshoot issues with Windows SharePoint Services.

If we select a different week the expand and collapse works fine in that calendar.

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

Custom Web Part Problem After SharePoint Restore

Hi, I've recently moved our sharepoint site and databases (using Microsoft Internal Database) to another standalone server. I did a catastrophic backup and then restored it on the destination server successfully via the central Administration page. I have also copied our custom web part library dll to 'c:\windows\assembly' directory and 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin' directory. I also copied over the old web.config file to 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80'. However, I still seem to be missing something as I get the error below while loading the site. I haven't been able to find a solution so hoping someone has seen it before here. Has anyone seen this happen before? Any advice/help would be greatly appreciated. Many thanks. Mehds ERROR====================================================================================================== The “webpartname” web part appears to be causing a problem. Object reference not set to an instance of an object.  Web parts maintenance page: if you have permission, you can use this page to temporarily close web parts or remove personal settings. For more information, contact you site administrator. ==========================================================================================================

Problem opening excel

hello everyone, i m having a serious problem, and i have been searching for days and i couldn't find a solution, my application deployed on IIS 7.5 is working very good except when trying to open excel file, i am getting an error telling me that the path is wrong or page is already used or the workbook you are trying to save already exists. to open excel m using: Dim xlApp = new Excel.application Dim xlWorkbook = new Excel.workbook Dim xlWorksheet = new Excel.worksheet   xlapp = new Excel.application xlworkbook = xlapp.workbooks.open(xxx) and here is the line of error !!!!     it seems to be a problem with the security privileges of the users, i have been told to find the excel application in Component services - COM+ and change it's security, but the problem is that i can't find the excel application in COM+ so i have tried this: Component services - mycomputer - properties - COM security - Edit default(for acces, launch and activiation permissions) and grant it for Network Service, USers and IIS_IUsers and still that did not work out.   any solution?  

Problem about opening Office documents in SPS2003

Hi, I have a problem about opening Office documents in SPS2003. The situation is as follows: I use the same NB in building A and building B. In building A everything is fine but in building B when I open Office documents(word, excel..) in my SPS2003 portal something happened. If documents don't need authorization these documents are opened quickly but documents that need authorization when I typed id and password documents are opened very slowly(about 5-10 minutes). So what is the reasom about this problem. Any suggestion? Thanks.

Problem with opening Office documents

How's your SP Environment, Are you happy with it? Here's my Biggest bone!#1 Issue   Annoying Prompt's when trying to Open Office Documents when accessing the sites through AD? All those who read this please state weather or not you encounter this problem, or have.This problem Usually occurs when your trying to access a SP Protected and Anonymous Site through windows Auth (AD) outside of your office LAN. when your at your home PC.Now I just would like to open a Discussion to see who faces this issue, and who doesn't and see what the common factors are in each. Thank you in advance!

IE8 not opening web pages after logging in

My IE8 is not opening pages after logging in to the page. An example is when I log in to Facebook all I get is the header bar and divider lines down the side. I can however use the settings menu. I have no problems with Firefox which I downloaded after this problem started. I have searched all forums and Microsoft and nothing works.... PLEASE HELP!!

problem in join two pages with session

hi every body I have two web pages one for inbox messages and second for details for one message in first page I have gridview include name the sender , address the message and details message alongside with buttonfield to go  to another page to view  full message the code of gridview<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1" Width="648px" onrowcommand="GridView1_RowCommand"> <Columns> <asp:BoundField DataField="sender" HeaderText="sender" SortExpression="sender" /> <asp:BoundField DataField="address" HeaderText="address" SortExpression="address" /> <asp:BoundField DataField="details" HeaderText="details" SortExpression="details" /> <asp:ButtonField Text="More..." CommandName="Show_More" /> <asp:TemplateField ShowHeader="False"> <ItemTemplate> </ItemTemplate>

problem with displaying items in list view web part

I have a list view webpart at default display form. Default Display form display items (for example) from the contracts documents library. List view webpart also associated with the same documents library (contracts). In such case this webpart doesn't display any item. But if I add another list view web part associated with warrants document library it display item without any problems. Is it possible to bind list view webpart to another data source for contracts document library? Or maybe another solution? Thanks!

aligning columns in web part pages

Hi, i have a page that has lots of web parts displaying various lists. I cannot get the columns to line up properly, so they all look misaligned. Is there any way to fix this? I found this article which describes the problem exactly but the fix only works for SharePoint 2007 ( I am running SharePoint 2010 Enterprise) http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/b92955a8-a1c9-45e1-91e4-b241513b0e25

Custom Webpart not working on "My Profile" page but works on all other pages. Linq Problem?

Hi, I created a publication site and in that site i created pages with specifique metadata (using a pagelayout with a custom content type)0. My webpart is getting data from those pages and displaying it. My webpart works on every page except on the "my profile" page(overview tab). I get the following error: Invalid Url: /TestSites/course I used the SPMETAL to create a class and i'm using this class to retrieve the data from the pages (with linq). The url i give to the entity is http://pcp/TestSites/course  this works fine on every site except on the my profile page. Can anybody help me? Here is the code i use to retrieve my data: EntitiesDataContext ctx = new EntitiesDataContext(courseSite); //Code below gets only the pages with a courses contentType. //EXCEPTION TRIGGERT ON THE FOLLOWING LINE IF IN PROFILE PAGE EntityList<Courses> course = ctx.GetList<Courses>("Pages"); //Writing the query to get the correct pages(with the course page layout only! var Query = from myCourse in course.ToList() where myCourse.CourseParticipants.Contains(myWeb.CurrentUser.LoginName) Select new{myTitle = myCourse.CourseTitle, myCompany = myCourse.Company, myPath = myCourse.Path, myName = myCourse.Name }; Thx.    
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