Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MVCjQueryRazor
I have to call ActionResult Index() method before the light box pops up on the click of the @html.ActionLink.so is there any way to achieve this.
 
Thanks
Eber yusuf
Posted 17-Sep-12 4:58am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

So, do you want light box to open after the new page opens? In that case, you need to have some hidden value to indicate that the light box should be shown, bind it to a model, and on $(document).ready open the light box. Or you can use $.ajax to perform some action on the server and then on success display the light box.
 
Check out this fiddle for an example:
 
http://jsfiddle.net/6sV8K/[^]
 
Without using either of these 2 methods, a plain anchor tag could only redirect you to an url.
 
In case I am missing something post your comments to my answer or update your question!
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Dnyaneshwar@Pune 1,300
1 Sergey Alexandrovich Kryukov 642
2 Tadit Dash 350
3 ravikhoda 300
4 Manas Bhardwaj 240
0 Sergey Alexandrovich Kryukov 11,271
1 OriginalGriff 6,865
2 Peter Leow 4,795
3 Abhinav S 3,838
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web03 | 2.8.140421.2 | Last Updated 17 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid