Sunday, September 30, 2012

Three-Tire architecture in asp.net Or Windows

Here i will explain How to create Three-tire Architecture in .Net using C#. Here i am not going to show how to use connection string from web.config because, Previously i showed how to use Connection String in Three-Tire architecture from web.config file in this POST.

In this post i am using ASP.Net for my convenience. In realtime also most of the Developers use ASP.Net only.

Here we have 3 projects
  • UI Validation (ASP.Net)
  • BLL (Business Logic Layer)
  • DAL (Data Access Layer)
  1. Create a ASP.Net Project and name it as u like. in my case (ThreeTire) -- UI
  2. In the SolutionExplorer Rightclick on the project u created (ASP.Net) and add Class Project and Name it as U like, in my case (ThreeTire.BLL) -- BLL
  3. Again In the SolutionExplorer Rightclick on the project u created (ASP.Net) and add another Class Project and Name it as U like, in my case (ThreeTire.DAL) -- DAL
Up-to Now  we created 3 projects. Now add reference to one another.

  • First RightClick on the ThreeTire.BLL and add reference of ThreeTire.DAL
  • In the Same way RightClick on the ThreeTire (ASP.Net) project and add reference of ThreeTire.BLL
 
 

Wednesday, September 19, 2012

Check / UnCheck Gridview page / All Pages CheckBoxes using Jquery in ASP.Net and c#.Net

In the previous post Check / UnCheck Gridview page CheckBoxes using Jquery in ASP.Net which checks only current page checkboxes of the gridview using Jquery and looses checkbox state when the gridview page was changed.

Here i will show how to check all the check boxes using c#.Net and it maintains checkbox state when gridpages are changed.


ASPX Page :

Check Uncheck All Checkboxes in Gridview Using JQuery

Here i will show how to Check or UnCheck Gridview CheckBoxes using Jquery. As the title says it checks only current gridview page.




Script to check All CheckBoxes :

Accessing session Value in Http Handlers and from Http Handlers

In this post i will explain how to access session Value in Http Handlers and from session value from Http Handlers.

In the previous post Dynamic Thumbnail Images using Http Handlers in asp.net C# explained how to show images using Http Handlers.

To access session value in Http Handler use following code

Ex :

In the code behind


         Session["imgID"] = "2";

Dynamic Thumbnail Images using Http Handlers in asp.net C#

In this post I will show how to display ThumbNail Images Dynamically Using Httphandlers in asp.net and C#. In this post i will Show How to Access Session Values in HttpHandler

Add new generic handler and name it as you like In my case ThumbNail.ashx and the code for this handler can be seen below.

Out Put :



Http Handler (*.ashx) :


Monday, September 17, 2012

Disable Previous Dates in Jquery DatePicker based on Other DatePicker in ASP.Net

As the Title Says Disable previous Days in Jquery Date Picker based on the other DatePicker and here i will show how to display text in the second textbox when first datepicker was selected.

In the other post i was explained  
  1.   Plain text as watermark for password text box using     
  2.   ASP.NET textbox with jQuery UI DatePicker
OutPut :