Problem with Web Content Form in a Web Application when trying to attach masterpage

Hi,

When I try to create a web content form and select to use the masterpage below Visual Studio 2008 freezes. It works with any other masterpage and everything else works fine in Visual Studio. Everything compiles and runs. To replicate this problem put the below files in a new web application and then try and create a web content form and use the master page. I have tried this on a number of different machines and still have the same problem. I have used the masterpage in other projects and still falls over so I know its not the sln or proj files, and when its been deployed using our CI server it runs fine.  Any help on this will really help. I am beginning to think this might be a bug with Visual Studio 2008 but I doubt it.

 

Master.master

 
1    <%@ Master Language="C#" AutoEventWireup="True" CodeBehind="site.master.cs" Inherits="Company.UI._resources.masterpages.site" %>
2    
3    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 5 <html xmlns="http://www.w3.org/1999/xhtml" >
6 <head id="Head1" runat="server">
7 <title>Company</title>
8 <link href="../css/xxxcss" rel="stylesheet" type="text/css" />
9 <link href="../css/xxx.css" rel="stylesheet" type="text/css" />
10 <link href="../css/xxx.css" rel="stylesheet" type="text/css" />
11 <link href="../sxxxxx/xxx.css" rel="stylesheet" type="text/css" />
12 <asp:ContentPlaceHolder ID="head" runat="server">
13 </asp:ContentPlaceHolder>
14 </head>
15 16 <body>
17 <form id="form1" runat="server">
18 <div id="wrapper">
19 <asp:Literal ID="LiteralSubModelScripts" runat="server" />
20 <div>
21 <div id="topbannerbox">
22 <div id="topmenucontainer">
23 <div id="topmenu">
24 <a id="HyperLinkDashboard" href="~/user/default.aspx" runat="server">
25 <img id="Img1" src="~/_resources/images/icons/coursedash.gif" alt="User Dashboard" runat="server"/>User Dashboard</a>
26   
27 <a id="HyperLinkLogin" href="~/user/default.aspx" runat="server">
28 <img id="Img3" src="~/_resources/images/icons/login.gif" alt="Login" runat="server"/>Login</a>
29 </div>
30 </div>
31 <div id="moduletoptitlecontainer">
32 <div id="moduletoptext">Module</div>
33 <div id="moduletoptitle"><a id="A3" href="~/course/presentation_skills.aspx" runat="server">presentation skills</a></div>
34 <a id="A4" href="~/page.aspx?id=1" runat="server"><< Previousa id="A5" href="~/page.aspx?id=2" runat="server">Next</a> >>
35 </div>
36
37
38
39 <div id="tabstopcontainer">
40 <div style="text-align:right"><asp:TextBox ID="TextBoxSearch" runat="server" Text="Search Site..."></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Search" /></div>
41 <br /> 
42 <a href="~/user/default.aspx" runat="server"><img src="~/_resources/images/tab_home.jpg" runat="server" alt="Home"/></a>
43 <img src="~/_resources/images/tab_test.jpg" runat="server" alt="Test"/>
44 </div>
45 </div>
46 <div id="pagecontent">
47 <br />
48
49 <asp:ContentPlaceHolder id="ContentPlaceHolderBody" runat="server">
50 </asp:ContentPlaceHolder>
51
52 <asp:ContentPlaceHolder id="ContentPlaceHolderMid" runat="server">
53 </asp:ContentPlaceHolder>
54
55 </div>
56
57 <div id="footer">
58 Copyright © 2008 ( xxBuildxx )
59 </div>
60 </div>
61 </div>
62 </form>
63 </body>
64 </html>
65
 

Master.master.cs
1
using System;
2 using System.Collections;
3 using System.Configuration;
4 using System.Data;
5 using System.Linq;
6 using System.Web;
7 using System.Web.Security;
8 using System.Web.UI;
9 using System.Web.UI.HtmlControls;
10 using System.Web.UI.WebControls;
11 using System.Web.UI.WebControls.WebParts;
12 using System.Xml.Linq;
13 14 namespace Company.UI._resources.masterpages
15 {
16 public partial class site : System.Web.UI.MasterPage
17 {
18 protected void Page_Load(object sender, EventArgs e)
19 {
20 21 }
22 }
23 }
 
Master.master.designer.cs 
 
1    //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:2.0.50727.1433
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10 11 namespace Company.UI._resources.masterpages {
12
13
14 public partial class site {
15
16 /// <summary>
17 /// Head1 control.
18 /// </summary>
19 /// <remarks>
20 /// Auto-generated field.
21 /// To modify move field declaration from designer file to code-behind file.
22 /// </remarks>
23 protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
24
25 /// <summary>
26 /// head control.
27 /// </summary>
28 /// <remarks>
29 /// Auto-generated field.
30 /// To modify move field declaration from designer file to code-behind file.
31 /// </remarks>
32 protected global::System.Web.UI.WebControls.ContentPlaceHolder head;
33
34 /// <summary>
35 /// form1 control.
36 /// </summary>
37 /// <remarks>
38 /// Auto-generated field.
39 /// To modify move field declaration from designer file to code-behind file.
40 /// </remarks>
41 protected global::System.Web.UI.HtmlControls.HtmlForm form1;
42
43 /// <summary>
44 /// LiteralSubModelScripts control.
45 /// </summary>
46 /// <remarks>
47 /// Auto-generated field.
48 /// To modify move field declaration from designer file to code-behind file.
49 /// </remarks>
50 protected global::System.Web.UI.WebControls.Literal LiteralSubModelScripts;
51
52 /// <summary>
53 /// HyperLinkDashboard control.
54 /// </summary>
55 /// <remarks>
56 /// Auto-generated field.
57 /// To modify move field declaration from designer file to code-behind file.
58 /// </remarks>
59 protected global::System.Web.UI.HtmlControls.HtmlAnchor HyperLinkDashboard;
60
61 /// <summary>
62 /// Img1 control.
63 /// </summary>
64 /// <remarks>
65 /// Auto-generated field.
66 /// To modify move field declaration from designer file to code-behind file.
67 /// </remarks>
68 protected global::System.Web.UI.HtmlControls.HtmlImage Img1;
69
70 /// <summary>
71 /// HyperLinkLogin control.
72 /// </summary>
73 /// <remarks>
74 /// Auto-generated field.
75 /// To modify move field declaration from designer file to code-behind file.
76 /// </remarks>
77 protected global::System.Web.UI.HtmlControls.HtmlAnchor HyperLinkLogin;
78
79 /// <summary>
80 /// Img3 control.
81 /// </summary>
82 /// <remarks>
83 /// Auto-generated field.
84 /// To modify move field declaration from designer file to code-behind file.
85 /// </remarks>
86 protected global::System.Web.UI.HtmlControls.HtmlImage Img3;
87
88 /// <summary>
89 /// A3 control.
90 /// </summary>
91 /// <remarks>
92 /// Auto-generated field.
93 /// To modify move field declaration from designer file to code-behind file.
94 /// </remarks>
95 protected global::System.Web.UI.HtmlControls.HtmlAnchor A3;
96
97 /// <summary>
98 /// A4 control.
99 /// </summary>
100 /// <remarks>
101 /// Auto-generated field.
102 /// To modify move field declaration from designer file to code-behind file.
103 /// </remarks>
104 protected global::System.Web.UI.HtmlControls.HtmlAnchor A4;
105
106 /// <summary>
107 /// A5 control.
108 /// </summary>
109 /// <remarks>
110 /// Auto-generated field.
111 /// To modify move field declaration from designer file to code-behind file.
112 /// </remarks>
113 protected global::System.Web.UI.HtmlControls.HtmlAnchor A5;
114
115 /// <summary>
116 /// TextBoxSearch control.
117 /// </summary>
118 /// <remarks>
119 /// Auto-generated field.
120 /// To modify move field declaration from designer file to code-behind file.
121 /// </remarks>
122 protected global::System.Web.UI.WebControls.TextBox TextBoxSearch;
123
124 /// <summary>
125 /// Button1 control.
126 /// </summary>
127 /// <remarks>
128 /// Auto-generated field.
129 /// To modify move field declaration from designer file to code-behind file.
130 /// </remarks>
131 protected global::System.Web.UI.WebControls.Button Button1;
132
133 /// <summary>
134 /// ContentPlaceHolderBody control.
135 /// </summary>
136 /// <remarks>
137 /// Auto-generated field.
138 /// To modify move field declaration from designer file to code-behind file.
139 /// </remarks>
140 protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolderBody;
141
142 /// <summary>
143 /// ContentPlaceHolderMid control.
144 /// </summary>
145 /// <remarks>
146 /// Auto-generated field.
147 /// To modify move field declaration from designer file to code-behind file.
148 /// </remarks>
149 protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolderMid;
150 }
151 }
152
 
 
  
0
myke2008
4/25/2008 10:47:02 AM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

3 Replies
1252 Views

Similar Articles

[PageSpeed] 7

I am sorry what your problem indeed? 


Johnson
0
Johnson2007
4/28/2008 8:55:25 AM

Hi,

myke2008:
Everything compiles and runs. To replicate this problem put the below files in a new web application and then try and create a web content form and use the master page. I have tried this on a number of different machines and still have the same problem.

Base on your description, we cannot unserstand what the problem is that you encountered, what the error message is.

Could you please post more details of the description of problem?


Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Amanda
4/29/2008 6:12:32 AM

There is no error message visual studio freezes and is unusable until i kill the process.

I have had some other guys look at it and everyone is replicating the same problem. I have narrowed it down to  Master.Master line 34. It appears there is a bug with Visual Studio 2008. Someone else has reported a very similar problem on the bug reports. I am sure a few people do not beleive its a bug, or that I am not using Visual STudio correctly. But If you use the files I placed above in a web application and attach a Web Content Form to the master.master page. Then Visual Studio 2008 will freeze. Or at least on Visual Studio 2008 Professional.

To get it working I deleted line 34 and everything is fine so I at least have a running Web App now.  

EDIT:

The line 34 in the above code Master.Master is wrong, this was edited while we were trying to fix the bug. To replicated the crashing of visual studio replace Master.Master line 34 with

<a id="A4" href="~/page.aspx?id=1" runat="server"><< Previous</a> &nbsp; &nbsp; || &nbsp; &nbsp;<a id="A5" href="~/page.aspx?id=2" runat="server">Next</a> >>
 
0
myke2008
4/29/2008 7:14:25 AM
Reply:

Similar Artilces:

Difference between mobile web applications and standard web applications + mobile web forms in them ?
I have a series of existing sites, but I need to make a PPC version of them (there already is one, but it uses standard web forms). Since the code-behind looks a lot in the PC and in the PPC version, I'd like both versions to use the same files for the code. I'm left with 2 options : - either create a new mobile web application for each existing web application, and put all the code behind in .dlls which I'll call from each page ; - or, if this is possible (and I'd rather do it), simply add mobile web forms to the existing web applications and redirect at login to the appropriate ve...

Structure of web application in regards to navigating between web forms
Hi All,I have implemented a purchase ordering system for a client that heavily utilises the AjaxControlToolkit.I have a simple screen that shows details of a purchase order, includung a list of order lines on it with the ability to edit them, and a button to add a line to the order.To edit an order line, the user either clicks the 'select' button in the list of order lines or clicks the add new line button.Editing / creating an order line occurs in a user control wrapped in an ajax modalpopup.Wthe way this works is that clicking either the add line button or select button does a post...

Controlling web control instances on Web Form
I have created a composite control, extending functionality of the Hidden Control. However, I would like to prevent the user from adding this control to the page multiple times. I only want one instance of the control on the Web Form. What setting in my project to I adjust to enable this functionality? I can not find it in any of the books that I have referenced. Is this a setting or is this code that has to be added to the inheriting class. Looks like there is no standard apporach. But I'd consider using static field to count number of created objects and throw exception if second object ...

Web Form vs. Web Content Form
If you don't mind, I would like to know what is the difference between those two items, when I go to add a new item I see both of those and I don't know what the difference is.  A content form is for use with a masterpage. A web form is a standalone web page. If you select web content form, you will then have to specify a masterpage for it. and what is a master page used for?  Hi, a master page is used to give a constant look and theme to a site, without having to duplicate code. So basically you can put your header, menu, nav and footer on a master page. Then a...

Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the Web Deve
I installed Visual Studio .NET 2003 on Windows Vista Home Premuim, but I'm unable to select "Web Development" item from "Server Components" during the installation. I installed all the pre-requisits but I can not see Front Page Server Extention in the programs. I can see also the IIS. Appreciate if any one can guide me with the solution.   Thanks.   FPSE is not included with Vista, it's a separate download.  See www.iis.net for this. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. Tha...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Dynamiclly added web control in a web control problem?
I have a small problem...I have a web control, that creates dynamicly some other my custom controls and add these to itself. But when there is a postback, how can I get the information of the dynamiclly added control. Here is my example:(I have simplified)  1 DropDownList d; 2 protected void Page_Load(object sender, EventArgs e) 3 { 4 d= new DropDownList(); 5 d.Items.Add("B"); 6 d.Items.Add("L"); 7 d.AutoPostBack = true; 8 d.SelectedIndexChanged += new Event...

How to access a control on a web form from anoter web form
hi all I have this scenarios i have two web forms, one called form1 and the other called form2 form1 has a label with id "lbl1" is it possible to access lbl1 from form2, change its text permenantly? thanks.   refer: http://dotnetslackers.com/Community/blogs/haissam/archive/2007/11/26/ways-to-pass-data-between-webforms.aspxSSNPlease remember to click "Mark as Answer" on the post that helps you. MinaSamy: hi all I have this scenarios i have two web forms, one called form1 and the other called form2 form1 has a label with id "lbl1" is it p...

Problem creating a custom control in a [web application] VS2005 rather than [web site]
I wanted to create a custom control in a web application so i wrote a class that inherited from a System.Web.Ui.webcontrol (Basevalidator) TextBoxValidator : BaseValidator  and then I placed it in the app_code folder. I then added this to the web.config :   <pages><controls><add tagPrefix="myCompanyPrefix" namespace="MyCompany.Library"></add></controls></pages> Then in the aspx page in that application I typed <myComp...  and then intellisense finshed it for me and I got a tag like this: <myComp...

C#.NET WEB APPLICATION
hei guys, i need help on my application, i'm using C#.NET as front-ed and SQL as back-end, aside from a datagrid, i want to display my data using textboxes and not a datagrid, i can do it using Visual Basic 6 but since i'm a newbee at C#.NET i don't know how to do it, specially the codes, can anyone help me with it? thank you in advance! If you are doing windows development, i would suggest using 'DataForm wizard' (Use Solution Explorer-->Rightclick project-->Add new Item-->New DataForm). It will guide you through steps. If you are doing web apps. Use quickstart to learn them. h...

Call one web application forms with in another web application ..
I am having forms named A1,A2,A3,A4,A5 in my web application1. And i am having B1,B2,B3,B4 and B5 in my web application2.I am using Windows authentication for my web application1. And i am using Form Authentication for my web application2.I am planning to host these 2 applications in 2 different servers.Here i am planning to have web application1 as a stand alone application.And Web application2 should interact with web application1.I want to call my web application1 forms in my web application2.But both authentication types are different.........???How to do it....??Any ideas ??Kamran Shahi...

Web control in web control
Hi,There are two simple web user controls A and B, where B contains A. They just display the bunch of text boxes, so I do not need them even in tool pane. They sit in the same project next to web form.I noticed that web user control put on ASPX page does not appear in code behind, but if I create it with protected keyword and name being exactly the same as id it works fine. I can access such a web control from code behind and see the value assigned in IE. The problem is that the same routine does work for my A web control in B. When I assign the value IE, I keep getting null reference. ...

Problem with Form Authentication & DeviceSpecific control in Mobile Web Application
Hello,        I am developing an Mobile Web application which need to be use Form Authentication. Below is some of the problem i am facing, i have also given the code snippet of my code. 1. I have developed one login page and implement form authentication & it works fine until i place one Device specific control in to it. It's Only when filter is "IsHTML32", it works fine when i made WML request in Openwave simulator.2. I have placed validation controls in to it and when i check Page.IsValid on code behind file it always return false. When i c...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Web resources about - Problem with Web Content Form in a Web Application when trying to attach masterpage - asp.net.navigation-controls

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Second visa application 'likely' to be approved
The family of a terminally ill Pakistani student can 'hopefully come to Australia sooner rather than later' says Immigration Minister Peter Dutton. ...

Tashfeen Malik's visa application under scrutiny - Business Insider Deutschland
The US government has released the visa application for Tashfeen Malik, who along with her husband killed 14 people in an attack in San Bernardino, ...

Panasonic Develops a Stretchable Resin Film and Its Application Materials for Stretchable Electronics ...
A stretchable film is developed. This film stretches to 2.5 times the original length and then returns to the original form. A conductive paste ...

MBA: Mortgage Applications Increase in Latest MBA Weekly Survey, Purchase Applications up 37% YoY
From the MBA: Refinance, Purchase Applications Both Up in Latest MBA Weekly Survey Mortgage applications increased 7.3 percent from one week ...

Cal State Schools Get Record Number Of Applications For 2016 Term
Schools in the California State University system received a record number of applications for the upcoming 2016 fall term, with more than 830,000 ...

German-Based Spirea Promotes Decentralized PV Applications In Uruguay
... Its technical operations specialist, Laurie Lawrence, pointed out that Uruguay [&hellip German-Based Spirea Promotes Decentralized PV Applications ...

Visa application of San Bernardino shooter released
CNN Visa application of San Bernardino shooter released CNN (CNN) The visa application of one of the San Bernardino shooters was released ...

Panasonic touch panel production to be solely for vehicle applications by 2020, says report
Panasonic is aiming to transfer its touch panel production completely to vehicle applications by 2020 in order to meet increasing demand for ...

Pre-K Applications Begin Jan 25, a Month Earlier Than Last Year, City Says
The DOE has moved the process up to Jan. 25 on the heels of a similar schedule shift for kindergarten. MANHATTAN — The application period for ...

Resources last updated: 1/3/2016 1:05:31 PM