.net Wand
.net used for magic
Browse by Tags
All Tags
»
asp.net
(
RSS
)
.net
ajajx.net
Ajax
IIS
javascript
SQL Server
tips
WebControls
JSON Serialization in AJAX.net both Client side and Server side
Tuesday, April 14, 2009 6:34 AM
JSON objects representations are small and lightweight compared to XML they are now the core of AJAX.net services serialization. in AJAX.net they work out of the box you can serilaize/deserialize your objects to JSON using this snippet of server side code using System.Web.Script.Serialization; JavaScriptSerializer jss = new JavaScriptSerializer(); //Serialize...
Read More...
Enumerate App settings
Tuesday, December 04, 2007 3:21 AM
well sometimes you just need to enumerate all of the keys in your appsettings section in web.config this is how it's done 1: foreach ( string str in WebConfigurationManager.AppSettings.AllKeys) 2: { 3: Response.Write( string .Format( "Key : {0},Value {1}</br>" , 4: str, WebConfigurationManager.AppSettings[str])); 5: }
Read More...
SQL Profiler custom filter
Friday, November 23, 2007 8:13 AM
the tip is simple u need to make a filter that filters and shows only your DB transactions on a server. what u need to do is to change your web.config by adding a string that you can later filter on 1: < add key ="Main.ConnectionString" 2: value ="data source=Server;initial catalog=dbName; 3: User ID=sa;Password=userName;application name=thisIsTheFilter"...
Read More...
Override IIS Maximum upload size [max upload size in asp.net]
Saturday, November 17, 2007 1:56 AM
by default IIS enables you to upload 2 megabytes and i couldn't seem to figure out how to change that using Internet service manager snap in but i found this on msdn and it's working perfectly fine alll you have to do is add this node right under <system.web> section in web.config 1: < httpRuntime maxRequestLength ="size in KiloBytes"...
Read More...
A potentially dangerous Request.Form value was detected from the client
Saturday, November 17, 2007 1:39 AM
by default asp.net checks for the scripts in requests so that if it finds a user that is posting javascript or HTML in a request body it will throw an exception "A potentially dangerous Request.Form value was detected from the client" but sometimes you need this like when you allow a user to send HTML formatted block like in an article or if you are...
Read More...
Are you sure [Prompt User Validation]
Saturday, November 17, 2007 1:26 AM
there's so many times when you need to ask a user "are you sure?" but you want it to be quick and painless you don't want to do one more server round trip just for that you can always use this the javascript prompt function so confirm() but how to integrate that into your asp.net code ok. 1: < asp:Button id ="btnDelete" runat ="server"...
Read More...
Reusing custom validator
Monday, November 12, 2007 12:54 PM
do u have custom validation code that u need to resuse, do u find yourself copying code of validation between pages well here's how to build a custom validator all you have to do besides inheriting Control is implement the IValidator Interface and here u go public class ValidatorControl: Control,IValidator {}
Read More...
Validatable ASP.net WebCustomControl
Monday, November 12, 2007 12:52 PM
when u add a required field validator to your page u get to select which control to validate, so what if u created that control you want to validate... just add the Attribute [ValidationProperty("PropertyName")] to your class and specify which public property of your control to use
Read More...
Ajax.net cancel a request
Monday, November 12, 2007 12:06 PM
well this is one of my old blog posts i'll be resposting them by time ammong new ones here we go this is very important if i have a request that i have issued using asp.net ajax client library this is how to cancel it 1: serviceHandler = new ServiceName().methodName(param1, param2, completeHendler ,errorHandler ); 2: // just keep the serviceHandler variable...
Read More...
Go
This Blog
Home
Contact
Links
About
Tags
.net
ajajx.net
Ajax
asp.net
C#
code generation
debug
free books
fun
IIS
industry news
javascript
open source
software engineering
source control
SQL Server
tips
tools
VBs
vs.net
web services
WebControls
Navigation
Home
Blogs
Forums
Archives
February 2010 (1)
January 2010 (1)
October 2009 (1)
August 2009 (1)
July 2009 (1)
June 2009 (2)
May 2009 (4)
April 2009 (1)
March 2009 (2)
February 2009 (1)
November 2008 (1)
September 2008 (1)
August 2008 (2)
March 2008 (4)
February 2008 (2)
December 2007 (13)
November 2007 (16)
Web 2.0 stuff
Syndication
RSS
Receive Email Updates
Subscribe