URL redirect not working - question

R

Reeve

I have a hyperlink control redirecting to another page within my site.
The URL is passed with the correct parameters, however the page won't
load.

I'm fairly new to this so I copied an existing web page that was
similar and made changes to the new context. The problem is that the
new page, when be called, doesn't get to the page_load method. Is there
some type of configuration that I missed?
 
M

Mark Rae

I have a hyperlink control redirecting to another page within my site.
The URL is passed with the correct parameters, however the page won't
load.

I'm fairly new to this so I copied an existing web page that was
similar and made changes to the new context. The problem is that the
new page, when be called, doesn't get to the page_load method. Is there
some type of configuration that I missed?

If this is v1.1, check that the modifications you've made haven't erased the
contents of the InitializeComponent() method in the Web Form Designer
generated code region - it's an extremely annoying bug which, thankfully, is
fixed in v2.
 
E

Eliyahu Goldin

It could be a browser caching problem. Try adding a random query parameter
to the url to trick the browser into loading the page from the server.

Eliyahu
 
R

Reeve

The URL passes different parameters each time I click the link. I have
also cleared out the cache and tried it again. Same effect.

Also, the contents of the InitializeComponent() method were not erased.
The page isn't even being loaded.

The name of the page I want to load is ManagerAccountTableEdit.ascx.
The navigateurl variable of the hyperlink I want to take me there is
...
"admin.aspx?Function=Administration&Action=ManagerAccountTableEdit&MgrAccountID=0&ManagerID="
& ddlManager.selectedvalue
...
This follows the same format used on existing pages. Is there
something I need to do in order to "attach" the new page to the project
or should it automatically be recognized?

Thanks again.
 
R

Reeve

Mark said:
If this is v1.1, check that the modifications you've made haven't erased the
contents of the InitializeComponent() method in the Web Form Designer
generated code region - it's an extremely annoying bug which, thankfully,is
fixed in v2.

The URL passes different parameters each time I click the link. I have

also cleared out the cache and tried it again. Same effect.

Also, the contents of the InitializeComponent() method were not erased.

The page isn't even being loaded.


The name of the page I want to load is ManagerAccountTableEdit.ascx.
The navigateurl variable of the hyperlink I want to take me there is
...
"admin.aspx?Function=Administration&Action=ManagerAccountTableEdit&MgrAccou­ntID=0&ManagerID="

& ddlManager.selectedvalue
...
This follows the same format used on existing pages. Is there
something I need to do in order to "attach" the new page to the project

or should it automatically be recognized?


Thanks again.
 
E

Eliyahu Goldin

..ascx is an extension for a user control, not for a page. You are loading a
page called "admin.aspx".

Also & ddlManager.selectedvalue looks very suspicious.

Eliyahu


Mark said:
If this is v1.1, check that the modifications you've made haven't erased
the
contents of the InitializeComponent() method in the Web Form Designer
generated code region - it's an extremely annoying bug which, thankfully,
is
fixed in v2.

The URL passes different parameters each time I click the link. I have

also cleared out the cache and tried it again. Same effect.

Also, the contents of the InitializeComponent() method were not erased.

The page isn't even being loaded.


The name of the page I want to load is ManagerAccountTableEdit.ascx.
The navigateurl variable of the hyperlink I want to take me there is
...
"admin.aspx?Function=Administration&Action=ManagerAccountTableEdit&MgrAccou­ntID=0&ManagerID="

& ddlManager.selectedvalue
...
This follows the same format used on existing pages. Is there
something I need to do in order to "attach" the new page to the project

or should it automatically be recognized?


Thanks again.
 
R

Reeve

Eliyahu said:
.ascx is an extension for a user control, not for a page. You are loading a
page called "admin.aspx".

Also & ddlManager.selectedvalue looks very suspicious.

Eliyahu

I'm sorry for the misunderstanding, I'm new :)

I meant to say I needed to load the user control
ManagerAccountTableEdit.ascx on the page admin.aspx. I have also
confirmed ddlManager.selectedvalue does produce the correct parameters
in the URL.

I still am confused why the user control isn't loading at all. I've
looked in the reference books I have, but there is not a lot of
information about user controls. Other than MSDN, is there any
websites that you all recommend for .net development information?
Thanks.
 
R

Reeve

Problem solved. Not that anyone cares, but just in case...

I needed to attach the newly created user control to the main (.aspx)
page. Made the connections there and it loaded like a charm.

Thanks to those who looked at this problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top