Asp.net

Building 3-tiered application with ASP.NET 2.0

ASP.NET

I found a series of some great “step by step” tutorials on different aspects of developing 3-tier application using ASP.NET 2.0.

Link:
Working with Data in ASP.NET 2.0

Must visit for all beginner .NET developers!

Tags: asp.net, architecture

I found a series of some great “step by step” tutorials on different aspects of developing 3-tier application using ASP.NET 2.0. Link: Working with Data in ASP.NET 2.0 Must visit for all beginner .NET developers!

ASP.NET State Management: ASP.NET State Management: View State

ASP.NET

Milan Negovan has written an article to provide an in-depth perspective on ViewState mechanism. In his article, he suggested some of the do’s and dont’s of using ViewState, for example, how simply disabling view state of the whole page can greatly enhance the performance of the page, if you just need to display a DataGrid on the page with no PostBack.

Link:
ASP.NET State Management: View State

I have seen many occasions that developers left EnableViewState true even if they just want to display a basic report page containing a grid control. This leads to the page to generate huge rendered payload for the ViewState.

Tags: viewstate, asp.net

Milan Negovan has written an article to provide an in-depth perspective on ViewState mechanism. In his article, he suggested some of the do’s and dont’s of using ViewState, for example, how simply disabling view state of the whole page can greatly enhance the performance of the page, if you just need to display a DataGrid on the page with no PostBack. Link: ASP.NET State Management: View State I have seen many occasions that developers left EnableViewState true even if they just want to display a basic report page containing a grid control.
Read More…

ASP.NET 2.0, 1 Database Server, 1 IIS 6.0 Web Server and 32,000 Concurrent Connections!

ASP.NET

Markus Frind has posted his experience of using ASP.NET 2.0 for one of largest dating site PlentyOfFish.com in Canada. In his post, Markus is telling how he has addressed concurrency issues by switching to ASP.NET 2.0:

At this point there were a lot of concurrency issues, the site would slooow down and just keep getting slower as more people came on. After switching to asp.net 2.0 all those problems went away. Now when there are over 32,000 concurrent connections at peak the site does not slow down. There are however still problems. I find that once you pass 100 Pageviews/second threads timers start to not get called for no reason.

Link:
Microsoft ASP.NET 2.0 Performance

He Interestingly didn’t use any kind of caching to render pages. Every page call actually pulls content from the database.

Tags: asp.net, database, performance

Markus Frind has posted his experience of using ASP.NET 2.0 for one of largest dating site PlentyOfFish.com in Canada. In his post, Markus is telling how he has addressed concurrency issues by switching to ASP.NET 2.0: At this point there were a lot of concurrency issues, the site would slooow down and just keep getting slower as more people came on. After switching to asp.net 2.0 all those problems went away.
Read More…

Checking all CheckBoxes in a GridView

ASP.NET

Scott Mitchell has written another fantastic article on the simple and clean implementation of providing the check/uncheck all functionality in the GridView control.

Link: Checking All CheckBoxes in a GridView

The only thing his implementation missing in the article is placing CheckBox in the header of the GridView, and using it to toggle rows CheckBoxes. I made a small modification to the existing code to add this feature:

 1 2 3 4 5 6 7 8 910111213141516171819202122232425
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    If Not Page.IsPostBack Then
        Dim dirInfo As New DirectoryInfo(Request.PhysicalApplicationPath)

        FileList.DataSource = dirInfo.GetFiles()
        FileList.DataBind()
    End If

    'On every page visit we need to build up the CheckBoxIDs array

    For Each gvr As GridViewRow In FileList.Rows
        'Get a programmatic reference to the CheckBox control

        Dim cb As CheckBox = CType(gvr.FindControl("RowLevelCheckBox"), CheckBox)

        ClientScript.RegisterArrayDeclaration("CheckBoxIDs", String.Concat("'", cb.ClientID, "'"))
    Next

    '--modified code

    Dim checkAll As New CheckBox()
    checkAll.Text = ""
    checkAll.ID = "checkAll"
    checkAll.Attributes.Add("onclick", "ChangeAllCheckBoxStates(this.checked);")
    FileList.HeaderRow.Cells(0).Controls.Add(checkAll)

End Sub

Tags: asp.net, grid

Scott Mitchell has written another fantastic article on the simple and clean implementation of providing the check/uncheck all functionality in the GridView control. Link: Checking All CheckBoxes in a GridView The only thing his implementation missing in the article is placing CheckBox in the header of the GridView, and using it to toggle rows CheckBoxes. I made a small modification to the existing code to add this feature: 12345678910111213141516171819202122232425 ProtectedSubPage_Load(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesMe.LoadIfNotPage.IsPostBackThenDimdirInfoAsNewDirectoryInfo(Request.PhysicalApplicationPath)FileList.DataSource=dirInfo.GetFiles()FileList.DataBind()EndIf'On every page visit we need to build up the CheckBoxIDs array ForEachgvrAsGridViewRowInFileList.
Read More…

Master Pages: Tips, Tricks, and Traps

ASP.NET

K. Scott Allen has written two great articles on using Master Page in ASP.NET. Through these articles Scott tried to address some of the common problems usually faced by developers.

Links:
Master Pages: Tips, Tricks, and Traps
Master Pages In ASP.NET 2.0

Tags: asp.net, c#, web

K. Scott Allen has written two great articles on using Master Page in ASP.NET. Through these articles Scott tried to address some of the common problems usually faced by developers. Links: Master Pages: Tips, Tricks, and Traps Master Pages In ASP.NET 2.0