Programming, Web News, Web Hostings, Technology
Posts tagged asp-net
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.
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
Disabling debug in other than dev environment – Sys.InvalidOperationException
Jun 30th
If your web application using Microsoft Ajax (Ajax Control Toolkit), then you probably encounter common unknown javascript error as following:
Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
Cause:
Unknown handler error in MicrosoftAjax.debug.js
Resolution:
To ensure your server not prompting this debug message on your test or production server, just set debug=”false” in web.config. By doing this, ASP.net will not automatically include MicrosoftAjax.debug.js into one of the resource.axd
Consuming ASP.NET Handler By jQuery Ajax With JSON
May 5th
Step towards Web 2.0 development nowdays, ajax is one of the important element in web development. There are various way of doing asynchronous call to server or web service to execute a job.
In this post, I am using jQuery to consume ASP.NET handler through a simple javascript codes. In the normal scenario, if client side requesting a simple string, server just have to return response context with plain/text. If you wish to return a set of data to be return in formatted string, you can either have the options like text/xml or application/json. My example code here will be using application/json with the assistance of third party component, Newtonsoft Json.
Scenario
“I Wish to use javascript to execute a job asynchronously to ASP.NET and receiving set of data in object. I do not wish to make my asynchronous call to any of my ASP.NET aspx pages because it is not a best practice. How can I do it?”
Expectation
- Data return from server in JSON object
- Calling ASP.NET handler
- Using jQuery
Prerequisite Component
- jQuery 1.3.2
- Newtonsoft Json
Solution File Structure

Download hellojson_050509_1229
Enhanced ASP.NET Tree View with JQuery
Jul 20th
Recently I come across to a project which required a tree view with some ASP.NET control to be attach with some tree view node. The default ASP.NET treeview doesn’t provide this feature and there is no way to extending the default tree view. Therefore, I decided to write a composite control from scratch.
The purpose of this control is to allow user to input control such as Button, Drop Down List, Radio Button List, Radio Button, List Box, Check Box List, Check Box and TextBox into each row of tree view. Additionally, I used JQuery assisting this tree view’s behavior of Collapse and Expand.
Result of this Extend Tree View as below:
Click here to see action in video:extend-tree-view
Example of the picture above showing the tree consisting 2 root with 1 level of sub-tree. Let’s see on “TICKET” root, there is a label with drop down list. This enabling user to check on “TICKET” and there is an input control allowing user to select which “TICKET” type (just an example scenario).
To begin with using the this tree, just drag and drop this tree view control from your sidebar or you can code as below:

Attached with this post the source code of this composite control with a demo web project: Download source code here
