ColorBox from LinkButton

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.
7/4/2011 10:22:26 PM
Gravatar
Total Posts 25

ColorBox from LinkButton

Hi:

I am trying to open colorbox from a link button using cblink and it just does not want to post the correct PostBack URL.. Am I missing something?

 

Thanks

Uday

7/6/2011 7:24:59 AM
Gravatar
Total Posts 18439

Re: ColorBox from LinkButton

LinkButton is designed to postback to the current page it is not a link, it is more like a button that looks like a link. Colorbox is designed to open a real link ie an url in a modal dialog. So it would not really make sense to try to use a LinkButton with colorbox just as you cannot use a Button to open a colorbox. If you want to open a page with colorbox just use a normal link.

Hope that helps,

Joe

4/17/2012 5:36:43 AM
Gravatar
Total Posts 4

Re: ColorBox from LinkButton

Hi Joe, i have the same problem, and i must use a linkbutton, why ? i have some things to save from server side before oppening colorbox. More precisely, i have a repeater with checkboxes, when i click thelinkbutton, i must save checked ones and oppen the colorbox to continue the operation.

4/17/2012 11:46:28 AM
Gravatar
Total Posts 18439

Re: ColorBox from LinkButton

You cannot make that work, post back is a server side event, usually one redirects out of postback after doing whatever processing is required in the post back so that there will be no duplicate postback if the user hits the refresh button on the browser. A LinkButton is more like a button than a link, colorbox can be used for links not linkbuttons, it is client side code (runs in the browser not the server) not server side and cannot be invoked from server side code.

Myself, I never use LinkButton for anything because LinkButton is one of the few .NET controls that does not work if javascript is disabled, it fails to postback. I only use Buttons or Hyperlinks. Hyperlinks do not postback, buttons always postback even if javascript is disabled. It is possible to style a Button to look like a link so there is never a good reason to use LinkButton in my opinion though that is a side topic vs your question about colorbox.

To make a button look like a link in mojoPortal put CssClass="buttonlink". But you still cannot invoke colorbox from server side code.

Hope that helps,

Joe

4/18/2012 4:33:34 AM
Gravatar
Total Posts 4

Re: ColorBox from LinkButton

Thank you Joe for the advices Sourire, have a great day ..

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