Stoyan Bukovich On .Net
-
Checking for file extensions method
A sample method for checking image file extension which can be used for exaple to check upload file control uploaded file types:
-
Catching page level errors and writing them in log file with auto controlled file size
-
Encrypt decrypt string
There is a class to encrypt ot decrypt strings
-
Storing image in database and retriving image from database
Here is the code for storing image in database (ms sql server 2005):
-
Using http header to send file
Here's how you can make use of http header response to send a file direct to the clients browser for download.
-
Page errors to app log file
Here's the simple code that I wrote not long ago to catch exception on page level and write them down in applications log file into applications root directory:
-
Adding advert rotator to your web app
I am going to show you how you can easy add cool advertisement banner rotator to your web applications, because in our days most important for your web pages to be successful is to "catch" the eye of your visitors and make them stay as long as possible. Ok first i will start from aspx code.
-
MS SQL resetting the auto increment
Have you ever wondered how to reset the auto increment in SQL table? Well I did, and here is how to achive this:
-
Getting the number of rows for todays date in MS SQL
Great in this example I am going to show you how you can get the rows from sql table (lets say you want to get the number of records that your users had made). For this purpose I will call our sql table just "table" and will make a field called "PostDate" where I am going to store DateTime.Now when user makes a post and I will use this field to compare it with the T-SQL getdate() which returns SQL servers date time. Ok, The "104" argument that you can see is German date time format dd.mm.yyyy.
-
User profile
Well this time I am going to show how to save values in user profile with asp.net membership provider.