Open URL Into a View(MVC 3)
Hi I have a problem with my Application I am using the MVC 3 with C# and VS 2010.
I have a old desktop application where in one form I added a control browser_Navigated for show one page where the user could add the credentials of yahoo for use one API.
Now my problem is that I don't know a lot of MVC3 then I am not sure how I can open one URL into a div I try to use Ajax.ActionLink
public ActionResult GetAuth开发者_运维问答orizationLink()
{
string s = "$('#divResultText').load('http:\\google.com')";
return JavaScript(s);
}
I would like comment that where I will show the information is a pop up then I think that I can't open a popup inside another popup.
Thanks for any help, for obtain some idea for fix this problem
You could use an <iframe>
to achieve that, especially if you are trying to load some external domain:
<iframe id="result"></iframe>
<a href="#" id="load">Load data</a>
and then:
$(function() {
$('#load').click(function() {
$('#result').attr('src', 'http://www.google.com');
return false;
});
});
精彩评论