asp:Hyperlink strange behavior. please explain

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/10/2011 12:45:50 PM
Gravatar
Total Posts 3

asp:Hyperlink strange behavior. please explain

hi

i have mojo installation accesible via http://mysite/mojo_1

i have created and registerd my module1.ascx module in CUSTOMMODULES folder. and i've created page  and placed my ascx on the main panel. new page is accessible via http://mysite/mojo_1/CUSTOMMODULES/Page1.aspx.

and i have module2.ascx, i add it in runtime inside module1.

inside module2.ascx i have 

<asp:Hyperlink NavigateUrl="page2.aspx"...... />

on my test server (IIS, .net4, win7 x64) this hyperlink is rendered as <a href="CUSTOMMODULES/page2.aspx">

but on the other server its rendered as  <a href="page2.aspx"> (correct!)

 

what i'm missing? 

 

 

3/10/2011 12:48:57 PM
Gravatar
Total Posts 18439

Re: asp:Hyperlink strange behavior. please explain

if you want it to resolve to the root of the site set the navigateurl like ~/page2.aspx

this is basic asp.net  knowledge.

Hope it helps,

Joe

3/10/2011 1:08:46 PM
Gravatar
Total Posts 3

Re: asp:Hyperlink strange behavior. please explain

maybe i have explained not correctly....

its not resolved, it's RENDERED as <a href="CUSTOMMODULES/page2.aspx"

but just the same copy of mojo (even the same DB) but on the other server renders as <a href="page2.aspx">

 

please look

http://img823.imageshack.us/g/codee.png/

3/13/2011 12:38:27 PM
Gravatar
Total Posts 18439

Re: asp:Hyperlink strange behavior. please explain

I think I did understand the question. I think you have not  understood my answer correctly.

I said change it from

<asp:Hyperlink NavigateUrl="page2.aspx"...... />

to

<asp:Hyperlink NavigateUrl="~/page2.aspx"...... />

please try the suggestion

You must sign in to post in the forums. This thread is closed to new posts.