IIS ASP - highlight text and right click on it for a custom context menu

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > March 2006 > highlight text and right click on it for a custom context menu





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author highlight text and right click on it for a custom context menu
Abdalla

2006-03-25, 11:58 am

Dear All

I have a project on making a UI of a Web page that allows users to:
1. select any text by highlighting it, and
2. do some action on it by right-clicking on the highlighted text and choose
an action among those options presented by the context menu items that
appears.
3. send the chosen action along with the text and its attributes to the
server as the user clicks on the desired menu item.

Interestingly, the next stage is to make the menu items customised by the
type of the selected text, e.g. a link or an ordinary body text.

Does anyone know if all these can be done fully using ASP.Net at the server
side?
Could anyone help, please?

Many thanks in advance.


Bob Barrows [MVP]

2006-03-25, 11:59 am

Abdalla wrote:
> Dear All
>
> I have a project on making a UI of a Web page that allows users to:
> 1. select any text by highlighting it, and
> 2. do some action on it by right-clicking on the highlighted text and
> choose an action among those options presented by the context menu
> items that appears.
> 3. send the chosen action along with the text and its attributes to
> the server as the user clicks on the desired menu item.
>
> Interestingly, the next stage is to make the menu items customised by
> the type of the selected text, e.g. a link or an ordinary body text.
>
> Does anyone know if all these can be done fully using ASP.Net at the
> server side?


No. Server-side code can only respond to form submissions. It cannot respond
to client events unless client-side script causes a postback to occur. In
this case a postback may be a less-than-ideal experience for the user. You
might want to look into AJAX (google for this term). In any case, you will
probably get more help in a client-side scripting or dhtml newsgroup

> Could anyone help, please?


There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.

HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com