Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 18, 2011 09:56 PM by tarikub
Feb 02, 2009 01:13 PM|LINK
Feb 02, 2009 01:44 PM|LINK
anything wrong with calling window.open and passing an url which points to your controller/action url?
Feb 02, 2009 01:52 PM|LINK
Feb 02, 2009 02:23 PM|LINK
Here's a quick example:
<input type="button" value="bt" onclick="window.open( '<%= Url.Action( "About", "Home" ) %>' );"
Not really pretty, I know. but the alternative is setting up a function and putting this url info into a global js variable. since this was dmeo code, I've just put here the quickest solution I've found.
Feb 02, 2009 02:32 PM|LINK
Feb 02, 2009 05:29 PM|LINK
hum...I'm not following...if it currently is rendered through RenderPartial method then you need to change your code so that you have a controller method that returns that partial view. Even better, why don't you add a view wich only renders that partial
view and then add a method to your controller which returns that new view? I believe that would be a good option for this scenario because the partial view won't render a complete HTML page...
Feb 02, 2009 05:59 PM|LINK
Feb 02, 2009 06:10 PM|LINK
Yep, that will do it, though the a.href will only work if you're using an anchor...
Feb 03, 2009 09:35 AM|LINK
Feb 03, 2009 09:48 AM|LINK
hum...whatt kind of data are we talking about? data that exists on the page that is currentyl displayed to the user? data that exists in the server? if it's on the page displayed to the user then you could send it back to the server and rebuild the object
there before passing it to the partial view...probably through the query string, if it isnt' sensitive information or if it's not too big...