Category Archives: Menu

[RESOLVED] Url routing from HTML side or from LI and Ul

Hello

     i am implementing Url routing in asp.net 4.0.

protected void Application_Start(object sender, EventArgs e)
        {
            CustomRouteTable(RouteTable.Routes);
        }

void CustomRouteTable(RouteCollection routes)
        {
            routes.MapPageRoute("Movie", "Movies", "~/Default.aspx");
            
            routes.MapPageRoute("English", "Movie/English", "~/Hollywood/Hollywood.aspx");
            routes.MapPageRoute("Tamil", "Movie/Tamil", "~/Tamil/Tamil.aspx");


        }


it works fine when i have button.

but when i have ul and li then i end up in problem.

<ul class="MasterMenu">
                                    <li><a href="Movie">Home</a></li>
                                    <li><a href="Movie/Tamil">Tamil</a></li>
                                    <li><a href="Movie/Telugu">Telegu</a></li>
                                </ul>


how to handle this html side??

how to navigate??

Thanks.


You are using wrong event of Global.asax. You should use event Application_BeginRequest to do this job. 

if you go through this you will have better idea....

http://www.codeproject.com/KB/aspnet/asp_net4_0_URLRouting.aspx#j

Thanks.

hello

 Thanks for link in codeproject....i could resolve my issue with using Resolve Url.  but will give try to your solution too.



[RESOLVED] icons near menu items

Hello. I have an asp:Menu control with several items. I would like to present small icons near each of them.

for example, near the "Play" item i would like to present and image of a triangle, the traditional 'play' symbol.

I couldn't find how to do that. if I try the property "SeparatorImageURL" it shows the icon just between the options,

and not to the left of them as I want.

if I try ImageURL or PopOutImageURL it doesn't show the picture at all.

what should I do?


[RESOLVED] Event PreRenderComplete cannot be found

Hello,

I have a web page that I added to an .aspx page in VS 2010.  I went to the Dropdown, chose [Page Events], and picked PreRenderComplete.  Visual Studio generated a stub event handler, but there's a blue squiggly under the Me. preRenderComplete  and I see the message that:

Event PreRenderComplete cannot be found

Here's the stub event handler:

 
Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.preRendercomplete

End Sub

If I do the same the for the PreRender, or PreInit events, it works just fine.  Any idea what's up?

Thanks,

Lance

Hi,

Not very sure it is the problem, modify this line:

Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRendercomplete

Instead of:

Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.preRendercomplete

Another way, you can try to add this event menually to see if it make sense:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
               AddHandler Page.PreRenderComplete, AddressOf Page_PreRenderComplete
               'add the event handlder
             

 End Sub


    Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As EventArgs)




    End Sub

Hope this can help you.

[RESOLVED] MS Word in frame,save and upload

 Hello..In my web page, I am using frames. When I click on a menu link in the left frame, the following should happen:

1.An exisiting word document(its a template that contains some text),which resides on a remote server,  should open in the right frame of the browser window.

2.I shoule be able to edit the word document. A button present in the left frame(called 'Upload') should save the word document in the remote server(the path is different from the template's path).

 

I am using Visual Studio 2005 and C#. I'm quite new to .NET.Is this possible? In the forum, I read about a piece of code:

Response.AddHeader("content-disposition","inline; filename=myfile.doc")
("inline" as opposed to "attachment")

which opens a word document in the same window. However, can this be used to open the document in a frame?

Any help will be appreciated. Thanks. 

 Any suggestions??

plasmalightwave

 Hello..In my web page, I am using frames. When I click on a menu link in the left frame, the following should happen:

1.An exisiting word document(its a template that contains some text),which resides on a remote server,  should open in the right frame of the browser window.

2.I shoule be able to edit the word document. A button present in the left frame(called 'Upload') should save the word document in the remote server(the path is different from the template's path).

 

I am using Visual Studio 2005 and C#. I'm quite new to .NET.Is this possible? In the forum, I read about a piece of code:

Response.AddHeader("content-disposition","inline; filename=myfile.doc")
("inline" as opposed to "attachment")

which opens a word document in the same window. However, can this be used to open the document in a frame?

Any help will be appreciated. Thanks. 

Based on your description, it seems that you want to achieve the following function.

1. Show word document in Browser.

2. Edit word document and save it to the server.

For the first requirement, please refer to this link.

http://www.shaunakelly.com/word/sharing/OpenDocInIE.html

http://support.microsoft.com/kb/178222

For the second one, please refer to this:

http://dotnetninja.wordpress.com/2009/01/12/how-to-open-sharepoint-documents-in-edit-mode-with-internet-explorer-6-and-windows-xp-without-regfix/

i am doing webdesktop and i would like to keep an ms word app in a frame ...can any one give me c# code