How to save Web page complate in MVC (Webpage,complete(*.htm;,html)) - asp.net-mvc-3

How can we programatically save complete web page in MVC?
I mean I want to save page as " Webpage,complete(*.htm;,*html)" style. I used the WebClient but it save only the HTML page. I awnt both page as well as images etc.. like saving webpage CTRL + s as Complete webpage. Please share if anyone knows
Regards
Sreyas MN

Related

asp.net mvc3 formauthentication,custom role provider-Jquery auto load tabs not working..

I am creating dynamically loading tabs using jquery Ui tabs in my ASP.NET mvc3 project.
Here i have a product page. The product page contains left menus like Customer,Address,Contact,etc..
Here my process is when i click one my left menus, the tab created dynamically with Grid records.
And,
I'm creating a custom role provider and I set a Authorize attribute specifying a role in my controller and it's working just fine, like this:
[Authorize(Roles="SuperAdmin")]
public class SuperAdminController : Controller
...
If one user doens't have access to this controller, And click one of my left menu means,
he's redirected to login page. Its also working fine.
The problem is after the user logged in it didn't redirect the proper page in tab content area.
If my problem not understandable means please let me know..
Thanks Advance...
If you carefully check the URL in the browser, you will see that the URL does not change when you load something by Ajax. That is the point of Ajax actually, you do not load the whole page, right?
Now as the state is not saved when you try to load the content using Ajax, your redirect URL is only the page you loaded initially. That is why you cannot go back to the tab you wanted to load.

How to open a new web page using mvc3 razor

I want to open new web page for exemple https://www.google.md/
I want to do this using #Html.ActionLink if it is possible, can someone help me?
I want to do this using #Html.ActionLink if it is possible
Html.ActionLink should be used for internal urls that are part of the same application as it depends on routing.
If you want to generate a link to an external url you could use a normal anchor element:
Go to google
If you want to open it in new browser page use also target="_blank"
Google!
but if you want just to open another web site's url with some value frome your code you can do it like:
Google!

How to page refresh after page redirect in Jquerymobile MVC

Hi all i have create a small jquerymoblie mvc3 aplication in that i have a list-view controle when click on the link in the list-view it render to the next page, in that page i have upload some data into database using text-boxes.After updated completed i have redirect to the previous page,Now i again redirect to same page for upload some other data but the text boxes fields are not clear it shows old data how can i clear that data when i page redirect.
I am using jquerymobile mvc3(Razor) application please help me how can i solve this probles..
If you go back to the "list page" with:
$.mobile.changePage("/control/list/", { reloadPage: true });
It should reload the page from scratch with AJAX.
There are also several more options for the changePage method which you can find in the docs: http://jquerymobile.com/test/docs/api/methods.html

How does a website load only part of the page and still display full on URLs?

I am looking at the Gawker blogs (http://io9.com, http://lifehacker.com/) and I'm curious about how they are made.
When I click for on a link only the article part of the page reloads displaying a loading icon while it does.
But what I can't figure out is that links point to new URLs like io9.com/something/something and its not something like I see on ajax pages that they put a site.com/#something tag at the end of the url from javascript to mark the page after an ajax request.
Can I change the full blown URL from javascript or what is happening?
When it happens, the website is using the HTML5 History API. This API can change the url (via JavaScript) without changing the page.
See caniuse.com for browser support.
If you would like to implement it in yout website, backbonejs.org would be very useful.

Using url with /#!/ like twitter does

Does anyone can tell me about what are urls like blablalba.com**/#!/**dasdas?
Twitter use them.
I have a problem with requesting page using AJAX, when I hit Back button, it doesn't load previous page that loaded using AJAX.
But, I saw in twitter, when you are in Timeline tab/page, and click #Mention tab, and hit Back button, it will bring you to Timeline tab/page again not to your previous loaded page (non AJAX). is there a relation between it and url with /#!/ characters ?
I am not familiar with Twitter, but your description reads a bit as if you were looking for Chris Coyer's screencast on using the hash fragment from JavaScript.

Resources