The question of providing a file trough a SaveAs dialog in a web browser appears very often in the forums and QA websites like Stackoverflow.
The default action of the web browser when a file is provided is to open it.
It automatically determines the file type and opens it inside the browser. An example would be a link to a .pdf, an excel or image file etc. When you click on it it opens the file in another tab or another page.
You have two options to achieve this depending whether you are using an already existing file or you are dynamically generating it(or getting it from a database or such).
Continue reading “Providing a File for Download trough a Save As Dialog in ASP.NET”
In the first part of these mini series we discussed how you can create a custom membership provider and a custom role provider.
Many times you will find yourself in a situation where you need to store and retrieve more data for a specific user than it is available in the MembershipUser class, which is the default for a MembershipProvider.
While there is a way to acomplish this by using profiles and the ProfileProvider class here I will show you how to accomplish this by creating a custom membership user.
Continue reading “Custom Membership User”
In the first part of these series we discussed and provided an example of how to create a custom membership provider. We will continue these mini series with a discussion and an example of how to create a custom role provider. We said in the first part that the reason of why you would like to create a custom membership provider would be if you want to use a data source different than the one supported or if you need to manage role information using a database schema that is different from the database schema used by the providers that ship with the .NET Framework. The reasons of why you would want to create a ciustom role provider are the same.
Custom Membership, Role Providers, Membership User Series.
Since these articles and the examples in them are pretty long, it could get pretty cumbersome to have all of them in one go so I split them up in several articles.
Here goes the first one.
The Custom Membership Provider Implementation
There are many times when the MembershipProvider and its underlying database construction aren’t sufficient enough for our needs. As MSDN states there are two reasons why one would want a custom MembersipProvider:
- You need to store membership information in a data source that is not
supported by the membership providers included with the .NET Framework,
such as a FoxPro database, an Oracle database, or other data sources.
- You need to manage membership information using a database schema that is
different from the database schema used by the providers that ship with
the .NET Framework. A common example of this would be membership data that
already exists in a SQL Server database for a company or Web site.
Continue reading “Custom Membership Provider”