开发者

Cannot find web project item

I am trying to create a webform. I added a button control on the web form but when i switche开发者_如何学JAVAd to the design mode i got the error: Error creating Button1 Cannot create web project item E:\MyProjects\C#\WebApplication1

Can somebody suggest a solution


You need to remove the # character because this character denotes a bookmark. It is a reserved "special character", just as ? and / are reserved (although these characters aren't allowed in folder names either).

Here is an example...

<img src="http://localhost/MyApplication/C#/Image1.png" />

This source location is treated as follows.

This part is treated as the location
http://localhost/MyApplication/C

This section denotes a bookmark (just as ? denotes a querystring)
#

This section is the anchor name for the bookmark
/Image1.png

So your image will try and load "http://localhost/MyApplication/C"

Here is an example of a real bookmark in action so you can see how it works... Pop this in a test html file (called "test.html").

<p><a href="test.html#bookmark">Down A Bit</a></p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p>Put some really long content in here...</p>
<p><a name="bookmark"></a>When you click on "Down a Bit", 
the page will jump to this location without re-loading the page.</p>


Somebody suggested to remove the # from the folder name. It starts working. But now the question is what is in the # which is causig errors?


For project path that have # char in the path, the solution is to remove the # char. But if your project path not have # char, just do Unload Project and load it again in existing solution, right now at the time you open the website, it will be fixed :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜