Programming, Web News, Web Hostings, Technology
Programming
Tips: ASP.NET Webform Postback Twice
Mar 20th
If your ASP.NET webform is postback twice, then you are coming to right place to get the solution.
ImageButton
Do remember to always set your ImageButton with ImageUrl. If the property of ImageUrl is blank, then it will postback twice for attend to get the value.
AutoEventWiredUp
If you think you are not using any ImageButton and your webform is triggering postback twice, most probably is due to the AutoEventWiredUp attribute. In VB.NET, whenever you add new webform, this property will auto set to False, while in C#.NET, whenever you add new webform, this property will auto set to True. Therefore, if you are developing ASP.NET application using VB.NET then you are safe. My advice for C#.NET web developer is to always set this AutoEventWiredUp to False and manually code the handler for any of Events.
Else…
If you are still facing this postback twice problem which are not due to ImageButton and AutoEventWiredUp, then probably you have to search around Google and you might found the solution.
Tips To Increase Performance of Store Procedure
Dec 9th
1. NOCOUNT
Normally if you perform query in Query Analyzer, it will return row count information in output. By default this NOCOUNT option is tuning OFF, it is advised to SET NOCOUNT ON to save overhead and increase performance.
This will not lock your table and increase performance. 3. Return Value
If you are querying about single value, to best is just return value to save the overhead and performance.
Microsoft Application Architecture Guide 2nd Edition from Patterns & Practices
Nov 16th
Microsoft Patterns & Practices released the 2nd edition of their Microsoft Application Architecture Guide. You can read it for free via HTML or purchase a copy from Amazon.
If you are using Microsoft development technology for example, Visual Studio as your development tool in your working or your part time job, you probably hear about Enterprise Library. It is best practice framework for building enterprise application for either Web or Winform application.
There is release on 2nd edition of their Microsoft Application Architecture Guide. Check it out.
ASP.NET MVC DropDownList and HTML Attributes « Rob Conery
Nov 12th
I setup the Controller to creaet a SelectList, like so:
NorthwindDataContext db = new NorthwindDataContext(); var categories = from c in db.Categories select c; ViewData["CategoryID"] = new SelectList(categories, "CategoryID", "CategoryName");Then, in my View I rendered the DropDownList:
=Html.DropDownList("CategoryID",ViewData["CategoryID"])%>
This is very important if you are using Html.DropDownList in MVC
Free ASP.NET 4 Hosting from MaximumASP
Nov 11th
MaximumASP is happy to announce the launch of a free hosting account to kick the tires of the latest and greatest from Microsoft – ASP.NET 4 and Visual Studio 2010.
This is cool I think to test out new dot net framework. I would like to test with Entity Framework 4
ASP.NET MVC – How to have multiple submit button in form
Sep 25th
In this tutorial, I would like to share simple form POST submit in ASP.NET MVC. The scenario is whenever your have have multiple submit button, you have to set each of the submit button value to be different.
End result page in your home page will containing two button (Search and Save button) in the same form.
Form above is rendered from HTML code behind as shown below
Create a new controller named “ProductController” in controller folder; Create a new folder named “Product” in “Views” folder, following by adding two new views (Save.aspx and Search.aspx)
Open up your “ProductController”, create three method as following (Edit, Search and Save)
You can download the sample code from here
ASP.NET MVC – How to implement querystring
Sep 24th
In this tutorial, I would like to share with you on how to create a simple query string in ASP.NET MVC with a very simple product listing page. End result of the query string would look something like below
http://localhost:1748/Product/Listing/Kitchen?page=4
or http://localhost:1748/Product/Listing/Kitchen
In your Global.asax, add new route
Create a new folder “Product” and create a new view “Listing”
In the content area, display product and page
Create a new controller name “ProductController” and create a new method “Listing”
You can download the sample code here












