How can I use ASP.NET to do the following

4.8 (5 votes)

A list of common things that people want to be able to use ASP.NET for on the client-side.

  • access a user's favorites list
  • delete their cache
  • delete their history
  • remove one item from their cache
  • remove one item from their history
  • write to a text file on their hard drive
  • force them to download a file or plugin without a prompt
  • force them to upload a file
  • get the filepath of an upload
  • adjust their page margins for printing
  • automatically print a page without a prompt
  • change their default printer
  • disable the back/forward buttons
  • read a key from their registry
  • change their security settings
  • automatically run an EXE on the client
  • force them to enable cookies
  • force them to enable javascript

The simple answer is you can't.

These, and a variety of other questions relating to operations on the client are regularly asked in server-side news groups and forums by beginners, and they basically illustrate a lack of understanding of the http request and response model, and the inherent security built into web browsers.

ASP.NET runs on the web server. Its job is to produce html and javascript which is sent as part of an http response to the client. Once the html has been sent, the web server knows nothing about the client, and it has no access to the client.

Date Posted:
Last Updated:
Posted by:
Total Views to date: 4998

0 Comments

Recent Comments

Thomas 05/03/2018 00:59
In response to I'm Not Writing A Book On Razor Pages
There's a typo on this page: = true)] should be [BindProperty(SupportsGet = true)]...

Rolf Herbert 04/03/2018 19:25
In response to I'm Not Writing A Book On Razor Pages
So is MS deprecating razor Web Pages..? Is it dead..? I wish they would stop killing things so its...

Borut 17/02/2018 12:59
In response to I'm Not Writing A Book On Razor Pages
Mike, is it possible that Web Pages and Razor Pages "live" together in one web application? I a I...

hrboyce 09/02/2018 04:44
In response to I'm Not Writing A Book On Razor Pages
Mike, First thanks for doing this but I have to ask, any chance you would consider converting one of...

aziz sallam 07/02/2018 10:18
In response to I'm Not Writing A Book On Razor Pages
u are a great man...

Satyabrata Mohapatra 31/01/2018 11:36
In response to I'm Not Writing A Book On Razor Pages
This is a great news!!!! Thanks...

tangdf 30/01/2018 07:25
In response to I'm Not Writing A Book On Razor Pages
=> { o.ConfigureFilter(new IgnoreAntiforgeryTokenAttribute()); }); The extension method does...

Obinna Okafor 30/01/2018 04:02
In response to I'm Not Writing A Book On Razor Pages
Thank you very much. I would like to see a project built from scratch using Razor Pages. And it show...

rachida Dukes 31/10/2017 13:52
In response to Customising Identity in Razor Pages
Thanks again for this wonderful tutorial. I followed all the steps in this section called: Adding...

Rachida 31/10/2017 12:06
In response to Customising Identity in Razor Pages
Thanks very much for this wonderful tutorial, it helped a lot....