ASP.NET / VB.NET - How do I clear out the Default.aspx file and have my form/page be the one that starts or have Default.aspx automatically call my page?

My first ASP.NET Web Forms app.  VB.NET code behind (familiar with VB.NET)
I started my app and have it mostly done.   When I started I just made my own GFview.aspx form and put all my code in there.
I see when I created the app, it threw in it's own "Deafult.aspx" file with a bunch of MS links for ASP sites/info.

I want to clear all that mess out and have it be blank and automatically call my GFview.aspx page.

My questions:

If possible, I would like to put the code in the Default.aspx.vb file/code.  What code do I use?
Public Class _Default
    Inherits Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

        '  ???   <== Here   ?

    End Sub

End Class

Open in new window

I have no idea what the URL would be of the page I want to call.
When I run it in design mode, the URL is this:  "http://localhost:52405/GFview.aspx"

I don't know much about web based functionality.

I guess the goal I am trying to acheive is removing the junk from the Default.aspx page and have my one page be that one that is used.  I hope that makes sense.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
in your web.config:
        <defaultDocument enabled="true">
                <clear />
                <add value="MyPage.aspx"/>

Open in new window

Chinmay PatelChief Technology NinjaCommented:
Hi sqdperu,

In addition to what Kyle has suggested,

Delete Default.aspx and rename your page from Solution Explorer(Not Windows Explorer) as Default.aspx


You can also set it via Project Settings. Project Properties > Web > Specific Page > Set it to GFView.aspx

Ron MalmsteadInformation Services ManagerCommented:
...if I'm understanding correctly, you just want it to automatically go to the GFView.aspx page when you load the site base URL?

   Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load


    End Sub

Open in new window

This will make Default.aspx redirect as soon as it's requested to the other page.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David Johnson, CD, MVPRetiredCommented:
In the future when creating the project select empty project rather than winforms as per this video
sqdperuAuthor Commented:
Thanks everyone.   I went Ron's idea this time around.  It worked for this particular situation.   But I may try yours in the future.
I appreciate the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.