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.

You might also like...

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

0 Comments

Recent Comments

Pam 30/08/2017 11:30
In response to Sending Email in Razor Pages
Mike, RazorPages sound like a nice choice for somebody still working in ASP classic who wants to to...

Robby Robson 15/08/2017 00:43
In response to Routing in Razor Pages
Mike: great stuff. Now that .Core Standard 2.0 is formally out, how soon will you rewrite your book...

Satyabrata Mohapatra 28/07/2017 08:59
In response to Sending Email in Razor Pages
Bit off topic, but congratulation sir for your MVP award. You deserve it !!!...

Satyabrata Mohapatra 23/07/2017 16:43
In response to Razor Pages - The Elevator Pitch
@Dale Severin You can continue to build apps using asp.net web pages....

Satyabrata Mohapatra 23/07/2017 16:40
In response to Sending Email in Razor Pages
Thanks for sharing...learned a lot...

Gfw 22/07/2017 11:53
In response to Sending Email in Razor Pages
Question... Does System.Net.Mail support SSL?...

Dale Severin 20/07/2017 03:38
In response to Razor Pages - The Elevator Pitch
I work with razor web pages extensively. I appreciate the rapid development it permits me to I am as...

Obinna Okafor 14/07/2017 01:19
In response to Routing in Razor Pages
Thank you, Mike. Good post....

Satyabrata Mohapatra 11/07/2017 16:02
In response to Routing in Razor Pages
Very powerful routing system!!...

Cyrus 05/07/2017 03:41
In response to Razor Pages - Getting Started With The Preview
How can I trim packages and services as much as possible to use just razor pages? I don’t want to to...