Setting up Master Page at runtime in asp.net

July 21st, 2010 by Sanket 
Setting up Master Page at runtime in asp.net   Many times we needs to decide master page at runtime. Here is quick help for the same. You will have to use ‘Page_PreInit’ method. In that set MasterPageFile attribute of current page to required master page. And Done ! protected void Page_PreInit(object sender, EventArgs e) {   this.Page.MasterPageFile = "~/MasterPages/"...

Enable SQL encryption in ASP.NET

January 21st, 2010 by Sanket 
Database Encryption is ASP.NET   If you are using the ADO.NET SQL Server managed data provider and a SqlConnection object to connect to SQL Server, then you can enable encryption by adding the encrypt=true parameter to the connection string as shown here. <configuration>    <connectionStrings>       <add name="MyDbConn"...

Get Vs Post Method

October 29th, 2009 by Sanket 
Get Vs Post Method in HTML, PHP and ASP.NET   Using "get" to pass information sends the information appended to the request for the processing page. It tends to be simpler and you can troubleshoot any problems simply by looking at the address bar in your browser since all values passed are displayed there. This is also the primary weakness of this method. The data being passed...