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: 4932

0 Comments

Recent Comments

ojorma 17/06/2017 09:24
In response to Razor Pages - The Elevator Pitch
Finally I can say goodbye to webforms...

Mau 06/06/2017 08:58
In response to Razor Pages - The Elevator Pitch
I am missing the razor view code. Thank you for your article. Design pattern should improve the of...

Obinna Okafor 26/05/2017 16:16
In response to Razor Pages - The Elevator Pitch
Thank you for this wonderful piece, Mike. I need more of these...Keep them coming - anything more...

Cyrus 26/05/2017 06:00
In response to Razor Pages - The Elevator Pitch
There are some concern about razor pages performance. Is it faster or slower than MVC? would you a a...

Cyrus 26/05/2017 05:44
In response to Razor Pages - Understanding Handler Methods
well done, thank you....

Satyabrata Mohapatra 23/05/2017 11:41
In response to Razor Pages - Understanding Handler Methods
Nice and easy !! Great post....

Cyrus 16/05/2017 19:55
In response to Razor Pages - Getting Started With The Preview
There is something wrong related to microsoft.dotnetcore.mvc.taghelpers! if you remove it from page...

Cyrus 16/05/2017 10:18
In response to Razor Pages - Getting Started With The Preview
well done mike, it was very useful, I really appreciate that....

Satyabrata Mohapatra 16/05/2017 07:21
In response to Razor Pages - Getting Started With The Preview
Finally!!!! web pages in asp.net core!!! Super excited !!!! Thank u sir for sharing.....Awaiting on...

Daniele 14/03/2017 10:24
In response to Working With Zip Files In ASP.NET MVC
is it possible give to the user a progress bar of the zipping process? Thanks in advance. ...