How to rename the TestPage.html in vs2008


 Sub Heading 4

The name of the default page in a VS2008 for SilverLight application is TestPage.html, this is really annoying so I changed it. BUT changing the name of this page wasn’t easy, you can change TestPage.html’s name in Solution Explorer, but you can’t rename TestPage.html.js. (And if you do it manually, the link between the two files in Solution Explorer is lost.)

This is how I did it:

1. go out to the file system and rename the files.

2. open the SLN file in Notepad and change this:

<ItemGroup>
  <None Include=”TestPage.html” />
  <None Include=”TestPage.html.js”>
    <DependentUpon>TestPage.html</DependentUpon>
  </None>
</ItemGroup>

to this:

<ItemGroup>
  <None Include=”Default.html” />
  <None Include=”Default.html.js”>
    <DependentUpon>Default.html</DependentUpon>
  </None>
</ItemGroup>

Once you open it in vs2008 it will be properly linked!

5 responses to “How to rename the TestPage.html in vs2008

  1. John Newbie Public

    Because this page comes up a lot in response to the question: “how to change TestPage.html in Silverlight”? I just want to point out the very obvious fact that if you just want a different name once you *deploy* your test page on your web site (not when you are building it), then simply rename the TestPage.html page to whatever name you want, and make sure it’s in the same directory as your .xap file. It took me a good half hour to figure that out, since everybody on the net (including here) is talking about renaming the TestPage.html when you are still building it in Visual Studio. Sorry if that’s obvious but for newbies it may not be. Also Visual Studio sometimes seems to have several html test pages with various names so make sure you test which test page (.html extension) in your \bin folder actually works before deploying it.

  2. Very interesting topic , thanks for putting up. “Nobody outside of a baby carriage or a judge’s chamber believes in an unprejudiced point of view.” by Lillian Hellman.

  3. Thanks for a marvelous posting! I seriously enjoyed reading it, you’re a great author.I
    will ensure that I bookmark your blog and definitely will
    come back very soon. I want to encourage yourself to continue your great
    work, have a nice morning!

  4. make your site to inspiration another people

  5. Anak muda yang akan sukses tidak akan pernah menyerah sebelum kesuksesan berada di tangannya

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s