单击mvc3中webgrid中的链接后的弹出窗口

问题描述:

你好朋友

我有一个在mvc3中具有 href 链接的webgrid.

现在,单击链接后,将返回一些响应,其中包含我想在弹出窗口中显示的服务器记录(单击该链接后,在控制器中运行新查询后,数据将来自服务器,比弹出窗口中显示的数据要多)窗口).

但是我不想打开一个新窗口.我想在同一浏览器页面的弹出窗口中打开它.

我不知道天气,我必须使用jQuery或AJAX.但是我想实现相同的功能.

请帮我实现这个

在此先感谢您

Hello friends

I am having a webgrid which is having href link in mvc3.

Now, when a link is clicked, then response is returned with some records from server that i want to display on a popup window (data will be comming from server after running a new query in controller after clicking that link and than shown in pop up window).

But i dont want to open a new window. i want to open it in a popup on same browser page.

i dont know weather I have to use jQuery or AJAX.But i want to implement same functionality.

Please help me to acheive this

Thanks in advance

您很困惑. AJAX和jQuery并不矛盾,它们是两个互补的东西.您应该使用jquery进行AJAX调用. AJAX无法显示您的弹出窗口,但这是不刷新页面即可联系服务器的唯一方法.

就像其他人所说的那样,有许多用于弹出窗口的jquery库.我会寻找的是灯箱,而不是模式弹出窗口.然后使用jquery进行AJAX调用,获取数据并在javascript中填充灯箱.
You are confused. AJAX and jQuery are not contradictions, they are two complementary things. You should use jquery to make AJAX calls. AJAX cannot show your popup, but it is the ONLY way to contact the server without refreshing your page.

As someone else said, there are a number of jquery libraries for popup windows. I would look for something that is a lightbox, not a modal popup. Then make your AJAX call, get your data, and populate your lightbox in javascript, using jquery.


点击此处以下
针对ASP.NET MVC的三种jQuery模式对话框的比较 [ ^ ]

希望对您有帮助
(n_n)

接受解决方案或投票,如果这对您有帮助

预先感谢
Click here below
A Comparison of Three jQuery Modal Dialogs for ASP.NET MVC[^]

I hope it helps you
(n_n)

Accept solution or vote if this will help you

thanks in advance


希望这将帮助您使用jquery在mvc3中显示模式弹出窗口.
MVC3中的Modalpopup
这是来自我的博客,我不能简单地将所有代码都转储到这里,所以请点击链接.让我知道它是否对您有帮助.
Hope this will help you to display modal popup in mvc3 using jquery.
Modalpopup in MVC3
this is from my blog, i cannot simply dump all the code here, so please follow the link. Let me know if it helped you.