purpose of life is joy

NAVIGATION - SEARCH

How to : Add app_code custom control into aspx page

Some time back, I was struggling to include the custom control to a page which I have created under the app_code folder to aspx page. Manually, I have done this with tags and so on. But I couldn't register it to the page. I felt I stuck here and there is no option to do that so. But I have noticed that many places of sample application, They referred the simple custom control in their pages. Below is that simple option to refer the custom controls to your asp.net pages.1.      Go to the aspx page design mode.2.      Register your control with the below template<%@ Register Assembly="__code" TagPrefix="[TagPrefix]" Namespace="Your.Namespace" %>3.      And use the control with the below syntax<[TagPrefix]: [TagPrefix] id=”” runat=server></<[TagPrefix]>Now you can easily compile and referrer the custom control under app_code folder.

How to : get content data type inside a string in C#?

By default, .NET have the features of identifying the data type inside a string. Everybody using this feature already in our day-to-day development activity. i.e. none other than TryParse. This TryParse method will help us in identifying the right type from the string. [More]

How to : convert a string content to native data type in C#

Most of the .NET data type having the TryParse method. This method will take input of the string and try to convert the value to the base type if it is successful, it ll return the converted value into out parameter and returns boolean value. This method will be helpful at the time of converting a string to a specific data type. [More]

How to : Create strongly typed generic session helper in C#?

Writing session code in ASP.NET is easy. but to organize and maintain is very difficult. To overcome that in one of our project, we have decided to created a generic Session Handler. This will replace the session keyword across the project. instead, this static session helper allow us to create session across the different pages by way of single static helper class. Here is the generic class for you. [More]
Protected by Copyscape Web Plagiarism Check
DMCA.com