<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-1113941468315876880</atom:id><lastBuildDate>Wed, 25 Jan 2012 13:54:46 +0000</lastBuildDate><category>LINQ</category><category>Repeater</category><category>Performance</category><category>CSS</category><category>Javascript</category><category>Image</category><category>Stored Procedure</category><category>GridView</category><category>SQL Server</category><category>Ajax Toolkit</category><category>Security</category><category>IIS</category><category>Web Service</category><category>Interview</category><category>Error Handling</category><category>Datalist</category><category>C#</category><category>Payment Gateway</category><category>WCF</category><category>CTE</category><category>SSRS</category><category>usercontrol</category><category>Asp.net</category><category>ViewState</category><category>T-SQL</category><category>Tips and Tricks</category><category>Applicationpool</category><category>json</category><category>Excel</category><title>Sandeep Prajapati</title><description>Asp.net, Sql Server, Jquery, WCF, Web Service, Telerik, json, XML etc. Expert (.net Technology Practice)</description><link>http://ransandeep.blogspot.com/</link><managingEditor>noreply@blogger.com (Sandeep Prajapati)</managingEditor><generator>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/blogspot/WJWG" /><feedburner:info uri="blogspot/wjwg" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-6098526953876142634</guid><pubDate>Sat, 07 Jan 2012 06:51:00 +0000</pubDate><atom:updated>2012-01-07T12:21:25.575+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Stored Procedure</category><category domain="http://www.blogger.com/atom/ns#">Interview</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">T-SQL</category><category domain="http://www.blogger.com/atom/ns#">Performance</category><title>Improve Performance by using OUTPUT in Insert Or Update Statement in single query</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello friends,&lt;br /&gt;
&lt;br /&gt;
recently I needed to fire a single SQL statement for Insert and Update and using the single statement I also needed to return the result of all Inserted/Updated Records details..&lt;br /&gt;
&lt;br /&gt;
after searching a lot ... I came to know a very interesting way to perform both statement in single Query.&lt;br /&gt;
&lt;br /&gt;
Generally for the scenario I got lots of suggestions to use Stored Procedure, but which was difficult for my scenario.&lt;br /&gt;
&lt;br /&gt;
so I must get solution for it.&lt;br /&gt;
&lt;br /&gt;
ok ok... let's come to point.&lt;br /&gt;
&lt;br /&gt;
let's we have created a sample Table using the query&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: sql"&gt;Create Table Table_1(Id Int Identity,Name nvarchar(100))&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
to insert records and get its generated Id &lt;br /&gt;
basically we perform like this&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: sql"&gt;Insert into Table_1(Name) 
Select 'Sandeep'
Select @@IDENTITY
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
and same way for update&lt;br /&gt;
here the Updated value comes from other process which is not available Directly&lt;br /&gt;
[My case is only For Insert. but the concept we can use in Update also]&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: sql"&gt;Declare @NewValue nvarchar(100)='Sandeep Prajapati'
Declare @ID int=1

Update Table_1
set Name=@NewValue
Where Id=@ID

select @ID as ID,@NewValue as Name
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Now We can use OUTPUT key word to select the inserted/Updated Value to get affected rows in single query which also helps to improve performance.&lt;br /&gt;
&lt;br /&gt;
Here is query for Insert&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: sql"&gt;Insert Into Table_1(Name)
OutPut Inserted.Id,Inserted.Name
values('Sandeep')
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
after execution of the query the output is&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-e0WFjaLkFuo/Twfp2SwLzMI/AAAAAAAAAm4/SB7XjyvWGus/s1600/Updated.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-e0WFjaLkFuo/Twfp2SwLzMI/AAAAAAAAAm4/SB7XjyvWGus/s1600/Updated.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Same way for Update&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class="brush: sql"&gt;Update Table_1
set Name='Sandeep Prajapati'
OutPut inserted.ID,inserted.Name
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-e0WFjaLkFuo/Twfp2SwLzMI/AAAAAAAAAm4/SB7XjyvWGus/s1600/Updated.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-e0WFjaLkFuo/Twfp2SwLzMI/AAAAAAAAAm4/SB7XjyvWGus/s1600/Updated.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Hope this helps...&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Happy Coding...&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-6098526953876142634?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ujafqDKRyvlJheXuabG9UBLs80s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ujafqDKRyvlJheXuabG9UBLs80s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ujafqDKRyvlJheXuabG9UBLs80s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ujafqDKRyvlJheXuabG9UBLs80s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/hzSPopf5MtM/improve-performance-by-using-output-in.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-e0WFjaLkFuo/Twfp2SwLzMI/AAAAAAAAAm4/SB7XjyvWGus/s72-c/Updated.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2012/01/improve-performance-by-using-output-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-7208602508776973132</guid><pubDate>Mon, 02 Jan 2012 12:07:00 +0000</pubDate><atom:updated>2012-01-02T17:43:22.833+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Interview</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">json</category><category domain="http://www.blogger.com/atom/ns#">WCF</category><title>Sample for WCF using json</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Here is a sample for start WCF using json&lt;br /&gt;
in aspx page&lt;br /&gt;
&lt;pre class="brush: html"&gt;  &amp;lt;script type="text/javascript"&amp;gt;
        function ajaxService2() {
            serviceUrl = "http://localhost/WCFS/Service1.svc/GetData";
            var time = new Object();
            time.value = "1";
            $.ajax({
                type: "POST",
                url: serviceUrl,
                data: JSON.stringify(time),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (transport) {
                    var string = transport;
                    $("#&amp;lt;%= Text2.ClientID %&amp;gt;").val(string);
                },
                error: function (ex) {
                    alert("error" + ex.responseText);
                }
            });
        }

        function ajaxService1() {
            serviceUrl = "http://localhost/WCFS/Service1.svc/GetAllProducts";
            $.ajax({
                type: "GET",
                url: serviceUrl,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (transport) {
                    var string = transport;
                    $("#&amp;lt;%= Text1.ClientID %&amp;gt;").val(string);
                },
                error: function (ex) {
                    alert("error" + ex);
                }
            });
        }
    &amp;lt;/script&amp;gt;
    &amp;lt;h2&amp;gt;
        Welcome to ASP.NET!
    &amp;lt;/h2&amp;gt;
    &amp;lt;p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;input id="Button2" onclick="ajaxService1()" value="Ajax call service 1" type="button"&amp;gt;
            &amp;lt;asp:textbox id="Text1" runat="server" /&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;input id="Button3" onclick="ajaxService2()" value="Ajax call service 2" type="button"&amp;gt;
            &amp;lt;asp:textbox id="Text2" runat="server" /&amp;gt;
        &amp;lt;/p&amp;gt;
    &lt;/pre&gt;
&lt;br /&gt;
Web.config Settings for WCF and json in WCF’s Web.config&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;?xml version="1.0"?&amp;gt;

&amp;lt;configuration&amp;gt;
    &amp;lt;system.web&amp;gt;
        &amp;lt;compilation debug="true" targetFramework="4.0" /&amp;gt;
    &amp;lt;/system.web&amp;gt;
    &amp;lt;system.serviceModel&amp;gt;
        &amp;lt;services&amp;gt;
            &amp;lt;service name="WCFS.Service1"&amp;gt;
                &amp;lt;endpoint
                address="" binding="webHttpBinding"
                behaviorConfiguration="EndBehave"
                contract="WCFS.IService1"/&amp;gt;
            &amp;lt;/service&amp;gt;
        &amp;lt;/services&amp;gt;
        &amp;lt;behaviors&amp;gt;
            &amp;lt;endpointBehaviors&amp;gt;
                &amp;lt;behavior name="EndBehave"&amp;gt;
                    &amp;lt;webHttp/&amp;gt;
                &amp;lt;/behavior&amp;gt;
            &amp;lt;/endpointBehaviors&amp;gt;
            &amp;lt;serviceBehaviors&amp;gt;
                &amp;lt;behavior&amp;gt;
                    &amp;lt;serviceMetadata httpGetEnabled="true"  /&amp;gt;
                    &amp;lt;serviceDebug  includeExceptionDetailInFaults="false" /&amp;gt;
                &amp;lt;/behavior&amp;gt;
            &amp;lt;/serviceBehaviors&amp;gt;
        &amp;lt;/behaviors&amp;gt;
        &amp;lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" /&amp;gt;
    &amp;lt;/system.serviceModel&amp;gt;
    &amp;lt;system.webServer&amp;gt;
        &amp;lt;modules runAllManagedModulesForAllRequests="true"/&amp;gt;
    &amp;lt;/system.webServer&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
in WCF Interface&lt;br /&gt;
&lt;pre class="brush: csharp"&gt; // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IService1
    {

        [OperationContract]
        [WebInvoke( ResponseFormat = WebMessageFormat.Json, Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest)]
        string GetData(int value);

        [OperationContract]
        CompositeType GetDataUsingDataContract(CompositeType composite);

        [OperationContract]
        [WebInvoke(UriTemplate = "/GetAllProducts", ResponseFormat = WebMessageFormat.Json, Method = "GET")]
        List&amp;lt;product&amp;gt; GetAllProducts();
        // TODO: Add your service operations here
    }


    [DataContract]
    public class Product
    {
        [DataMember]
        public int ProdId { get; set; }
        [DataMember]
        public string PropName { get; set; }
        [DataMember]
        public int Quantity { get; set; }
        [DataMember]
        public int Price { get; set; }
    }

    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }&lt;/product&gt;&lt;/pre&gt;
&lt;br /&gt;
Service Class&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] 
    public class Service1 : IService1
    {
        public List&amp;lt;product&amp;gt; GetAllProducts()
        {
            return new List&amp;lt;product&amp;gt;
            {
                 new Product() {ProdId=101,PropName="Laptop",Quantity=200,Price=45000},
                 new Product() {ProdId=102,PropName="Desktop",Quantity=300,Price=35000},
            };
        }
        public string GetData(int value)
        {
            return string.Format("You entered: {0}", value.ToString());
        }

        public CompositeType GetDataUsingDataContract(CompositeType composite)
        {
            if (composite == null)
            {
                throw new ArgumentNullException("composite");
            }
            if (composite.BoolValue)
            {
                composite.StringValue += "Suffix";
            }
            return composite;
        }
    }&lt;/product&gt;&lt;/product&gt;&lt;/pre&gt;
&lt;br /&gt;
Happy Coding….&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-7208602508776973132?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/U-kgcj5tBHgbLrp1M3rv8nNfAeg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U-kgcj5tBHgbLrp1M3rv8nNfAeg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/U-kgcj5tBHgbLrp1M3rv8nNfAeg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U-kgcj5tBHgbLrp1M3rv8nNfAeg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/ehqjNNc_lTE/sample-for-wcf-using-json.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2012/01/sample-for-wcf-using-json.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-7287428731948838323</guid><pubDate>Wed, 21 Dec 2011 10:04:00 +0000</pubDate><atom:updated>2011-12-21T15:35:25.426+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">IIS</category><category domain="http://www.blogger.com/atom/ns#">Applicationpool</category><title>Session Timeout in IIS 7 - Worker Process of ApplicationPool</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;u&gt;Problem&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Recently while testing my application, I was facing problem of Session time out. &lt;br /&gt;
By Default Session time is 20 mins and I wanted to extend it&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: medium;"&gt;&lt;u&gt;Attempts&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
if we want to extend it we can set in web.config within System.web tag&lt;br /&gt;
&amp;lt;sessionState mode="InProc" timeout="30"&amp;gt;&amp;lt;/sessionState&amp;gt;&lt;br /&gt;
that I already have done.&lt;br /&gt;
I set it as 30 mins.&lt;br /&gt;
but still my session was getting timed out after 20 min.&lt;br /&gt;
So I doubt that it doesn’t apply to my Code so I set It by code also like&lt;br /&gt;
&lt;pre&gt;System.Web.HttpContext.Current.Session.Timeout = 30;&lt;/pre&gt;
&lt;br /&gt;
still no progress&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: medium;"&gt;&lt;u&gt;Resolutions&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
after a long invastigation I came to know Its because Of Default Settings of ApplicationPool for the application in IIS.&lt;br /&gt;
&lt;br /&gt;
There is a setting for Worker process of IIS which will set memory and resource to allot to application application wide.&lt;br /&gt;
&lt;br /&gt;
in my case I was testing my application alone. So application was being idle for more than 20 min to check weather session is alive or not..&lt;br /&gt;
&lt;br /&gt;
To open the settings refer the steps&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;br /&gt;
&lt;li&gt;Type “inetmgr” in run window to open IIS&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;from left pane “Connections” select your application.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;right click on your application and refer the image to open “Advanced Settings” of application(to check which ApplicationPool is referred by application )&lt;a href="http://lh4.ggpht.com/-rMErHLSiTCA/TtoAwwMWU0I/AAAAAAAAAmA/9qzW3GuqLVw/s1600-h/1%25255B3%25255D.png"&gt;&lt;img alt="1" border="0" height="166" src="http://lh3.ggpht.com/-MzpRHBvGknI/TtoAysb6vfI/AAAAAAAAAmI/Mjsuaoo8sSE/1_thumb%25255B1%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="1" width="270" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;from “Application Settings” window you can see the Name of ApplicationPool. like &lt;b&gt;Asp.net V4.0, DefaultAppPool, Asp.net V4.0 Classic.&lt;/b&gt;&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;now close both opened windows.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;from left pan double click on &lt;b&gt;“Application Pools”, &lt;/b&gt;a list of created application pools will be displayed. if you want to create new application pool for specific application refer &lt;a href="http://technet.microsoft.com/en-us/library/cc731784%28WS.10%29.aspx" target="_blank"&gt;this&lt;/a&gt;&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;Right click on the ApplicationPool that was assigned to your Application and click on "Advanced Settings...."&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-LT5IJRMZY2Y/TvGrcswmuGI/AAAAAAAAAmU/mszw0iIowYU/s1600/AdvanceSettings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="234" src="http://4.bp.blogspot.com/-LT5IJRMZY2Y/TvGrcswmuGI/AAAAAAAAAmU/mszw0iIowYU/s320/AdvanceSettings.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;in the popup window ... check the Idle time out for ... that cause the timeout while web application is idle.&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-ZzfSxTR59FI/TvGtbmEYkeI/AAAAAAAAAmc/vht4AGHWSK8/s1600/Output.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-ZzfSxTR59FI/TvGtbmEYkeI/AAAAAAAAAmc/vht4AGHWSK8/s320/Output.png" width="261" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
Here are the steps to set Idle time..&lt;br /&gt;
&lt;br /&gt;
Happy Deploying...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-7287428731948838323?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rEpk4wNU5m9cCCQ5q5rnOpjGcTE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rEpk4wNU5m9cCCQ5q5rnOpjGcTE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rEpk4wNU5m9cCCQ5q5rnOpjGcTE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rEpk4wNU5m9cCCQ5q5rnOpjGcTE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/t6YVClbRrSs/session-timeout-in-iis-7-worker-process.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-MzpRHBvGknI/TtoAysb6vfI/AAAAAAAAAmI/Mjsuaoo8sSE/s72-c/1_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/12/session-timeout-in-iis-7-worker-process.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-4841923401374842483</guid><pubDate>Thu, 15 Dec 2011 14:51:00 +0000</pubDate><atom:updated>2011-12-15T20:24:04.787+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">SSRS</category><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>Steps to Remove Menu options in Export for Report Page in SSRS</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hi,&lt;br /&gt;
In SSRS(Sql Server Reporting Service), I wanted to remove extra options to export my report.&lt;br /&gt;
&lt;br /&gt;
Here are the steps to remove option to export like (word, Excel, PDF, MHTML etc...) in SSRS (Sql Server Reporting Service)&lt;br /&gt;
&lt;br /&gt;
Installation folder may be different from MSSQL.1, can be MSSQL.x (search for rsreportserver.config under Program Files\Microsoft SQL Server if not found)&lt;br /&gt;
Here are the steps for Disabling Excel Export Option in Reporting Services -&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;Go to Database server where reporting services is installed, open the rsreportserver.config file located at&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt; &amp;lt;Drive Letter&amp;gt;:\&lt;/span&gt;&lt;drive letter=""&gt;Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer&lt;/drive&gt;&lt;drive letter=""&gt;&amp;nbsp;&lt;/drive&gt;&lt;/li&gt;
&lt;li&gt;&lt;drive letter=""&gt;Go to &lt;configuration&gt; &lt;render&gt; section. &lt;/render&gt;&lt;/configuration&gt;&lt;/drive&gt;&lt;drive letter=""&gt;&lt;configuration&gt;&lt;render&gt;&amp;nbsp;&lt;/render&gt;&lt;/configuration&gt;&lt;/drive&gt;&lt;/li&gt;
&lt;li&gt;&lt;drive letter=""&gt;&lt;configuration&gt;&lt;render&gt;Change this entry &lt;extension name="EXCEL" type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"&gt; to&lt;extension name="EXCEL" type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" visible="false"&gt; i.e. add Visible="false" for Excel rendering extension&lt;/extension&gt;&lt;/extension&gt;&lt;/render&gt;&lt;/configuration&gt;&lt;/drive&gt;&lt;drive letter=""&gt;&lt;configuration&gt;&lt;render&gt;&lt;extension name="EXCEL" type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"&gt;&lt;extension name="EXCEL" type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" visible="false"&gt;&amp;nbsp;&lt;/extension&gt;&lt;/extension&gt;&lt;/render&gt;&lt;/configuration&gt;&lt;/drive&gt;&lt;/li&gt;
&lt;li&gt;&lt;drive letter=""&gt;&lt;configuration&gt;&lt;render&gt;&lt;extension name="EXCEL" type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"&gt;&lt;extension name="EXCEL" type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" visible="false"&gt;Same for PDF.&amp;nbsp;&amp;nbsp;&lt;/extension&gt;&lt;/extension&gt;&lt;/render&gt;&lt;/configuration&gt;&lt;/drive&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;drive letter=""&gt;&lt;configuration&gt;&lt;render&gt;&lt;extension name="EXCEL" type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"&gt;&lt;extension name="EXCEL" type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" visible="false"&gt;Happy Reporting &lt;/extension&gt;&lt;/extension&gt;&lt;/render&gt;&lt;/configuration&gt;&lt;/drive&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-4841923401374842483?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NkVR9rBDqiZXD3FdxLZQRNr2W5k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NkVR9rBDqiZXD3FdxLZQRNr2W5k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NkVR9rBDqiZXD3FdxLZQRNr2W5k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NkVR9rBDqiZXD3FdxLZQRNr2W5k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/zRCovRzizps/steps-to-remove-menu-options-in-export.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/12/steps-to-remove-menu-options-in-export.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-2238299926162411627</guid><pubDate>Sat, 19 Nov 2011 04:56:00 +0000</pubDate><atom:updated>2011-11-19T10:27:52.692+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Excel</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>Create Excel File From DataTable</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello Friends,&lt;br /&gt;
Many times we need to create Excel files in our application using existing Data.&lt;br /&gt;
I have figured out a class which will help to create excel file by just passing DataTable and preferred location to generate on server.&lt;br /&gt;
please download the cs file from &lt;a href="https://skydrive.live.com/?cid=552998535cb9985d&amp;amp;sc=documents&amp;amp;uc=1&amp;amp;id=552998535CB9985D%21127#"&gt;here&lt;/a&gt; .. and use it :)&lt;br /&gt;
&lt;iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="https://skydrive.live.com/embedicon.aspx/.Public/ExcelHelper.cs?cid=552998535cb9985d&amp;amp;sc=documents" style="background-color: #fcfcfc; height: 115px; padding: 0; width: 98px;" title="Preview"&gt;&lt;/iframe&gt;
&lt;br /&gt;
here is full code&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Xml;


    public class ExcelHelper
    {
        private static readonly ExcelHelper _instance = new ExcelHelper();

        public static ExcelHelper Instance
        {
            get { return _instance; }
        }
        /// &amp;lt;summary&amp;gt;
        /// Create one Excel-XML-Document with SpreadsheetML from a DataTable
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="dataSource"&amp;gt;Datasource which would be exported in Excel&amp;lt;/param&amp;gt;
        /// &amp;lt;param name="fileName"&amp;gt;Name of exported file&amp;lt;/param&amp;gt;
        public void Create(DataTable dtSource, string strFileName)
        {
            // Create XMLWriter
            using (XmlTextWriter xtwWriter = new XmlTextWriter(strFileName, Encoding.UTF8))
            {

                //Format the output file for reading easier
                xtwWriter.Formatting = Formatting.Indented;

                // &amp;lt;?xml version="1.0"?&amp;gt;
                xtwWriter.WriteStartDocument();

                // &amp;lt;?mso-application progid="Excel.Sheet"?&amp;gt;
                xtwWriter.WriteProcessingInstruction("mso-application", "progid=\"Excel.Sheet\"");

                // &amp;lt;Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet &amp;gt;"
                xtwWriter.WriteStartElement("Workbook", "urn:schemas-microsoft-com:office:spreadsheet");

                //Write definition of namespace
                xtwWriter.WriteAttributeString("xmlns", "o", null, "urn:schemas-microsoft-com:office:office");
                xtwWriter.WriteAttributeString("xmlns", "x", null, "urn:schemas-microsoft-com:office:excel");
                xtwWriter.WriteAttributeString("xmlns", "ss", null, "urn:schemas-microsoft-com:office:spreadsheet");
                xtwWriter.WriteAttributeString("xmlns", "html", null, "http://www.w3.org/TR/REC-html40");

                // &amp;lt;DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"&amp;gt;
                xtwWriter.WriteStartElement("DocumentProperties", "urn:schemas-microsoft-com:office:office");

                // Write document properties
                xtwWriter.WriteElementString("Author", "Sandeep Prajapati");
                xtwWriter.WriteElementString("LastAuthor", "Sandeep Prajapati");
                xtwWriter.WriteElementString("Created", DateTime.Now.ToString("u") + "Z");
                xtwWriter.WriteElementString("Company", "XXXXXXXXXX");
                xtwWriter.WriteElementString("Version", "12");

                // &amp;lt;/DocumentProperties&amp;gt;
                xtwWriter.WriteEndElement();

                // &amp;lt;ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"&amp;gt;
                xtwWriter.WriteStartElement("ExcelWorkbook", "urn:schemas-microsoft-com:office:excel");

                // Write settings of workbook
                xtwWriter.WriteElementString("WindowHeight", "8010");
                xtwWriter.WriteElementString("WindowWidth", "14805");
                xtwWriter.WriteElementString("WindowTopX", "240");
                xtwWriter.WriteElementString("WindowTopY", "105");
                xtwWriter.WriteElementString("ProtectStructure", "False");
                xtwWriter.WriteElementString("ProtectWindows", "False");

                // &amp;lt;/ExcelWorkbook&amp;gt;
                xtwWriter.WriteEndElement();

                // &amp;lt;Styles&amp;gt;
                xtwWriter.WriteStartElement("Styles");

                // &amp;lt;Style ss:ID="Default" ss:Name="Normal"&amp;gt;
                xtwWriter.WriteStartElement("Style");
                xtwWriter.WriteAttributeString("ss", "ID", null, "Default");
                xtwWriter.WriteAttributeString("ss", "Name", null, "Normal");

                // &amp;lt;Alignment ss:Vertical="Bottom"/&amp;gt;
                xtwWriter.WriteStartElement("Alignment");
                xtwWriter.WriteAttributeString("ss", "Vertical", null, "Bottom");
                xtwWriter.WriteEndElement();

                // Write null on the other properties
                xtwWriter.WriteElementString("Borders", null);
                xtwWriter.WriteElementString("Font", null);
                xtwWriter.WriteElementString("Interior", null);
                xtwWriter.WriteElementString("NumberFormat", null);
                xtwWriter.WriteElementString("Protection", null);


                // &amp;lt;/Style&amp;gt;
                xtwWriter.WriteEndElement();

                //&amp;lt;Style ss:ID="s16"&amp;gt;
                xtwWriter.WriteStartElement("Style");
                xtwWriter.WriteAttributeString("ss", "ID", null, "s16");
                xtwWriter.WriteStartElement("Font");
                xtwWriter.WriteAttributeString("ss", "Bold", null, "1");
                xtwWriter.WriteAttributeString("ss", "Size", null, "11");
                xtwWriter.WriteAttributeString("ss", "Underline", null, "Single");
                xtwWriter.WriteEndElement();

                // &amp;lt;/Style&amp;gt;
                xtwWriter.WriteEndElement();


                // &amp;lt;/Styles&amp;gt;
                xtwWriter.WriteEndElement();

                // &amp;lt;Worksheet ss:Name="xxx"&amp;gt;
                xtwWriter.WriteStartElement("Worksheet");
                xtwWriter.WriteAttributeString("ss", "Name", null, dtSource.TableName);

                // &amp;lt;Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="3" x:FullColumns="1" x:FullRows="1" ss:DefaultColumnWidth="60"&amp;gt;
                xtwWriter.WriteStartElement("Table");
                xtwWriter.WriteAttributeString("ss", "ExpandedColumnCount", null, dtSource.Columns.Count.ToString());
                xtwWriter.WriteAttributeString("ss", "ExpandedRowCount", null, (dtSource.Rows.Count + 1).ToString());
                xtwWriter.WriteAttributeString("x", "FullColumns", null, "1");
                xtwWriter.WriteAttributeString("x", "FullRows", null, "1");
                //xtwWriter.WriteAttributeString("ss", "DefaultColumnWidth", null, "60");

                // Run through all rows of data source


                // &amp;lt;Row&amp;gt;
                xtwWriter.WriteStartElement("Row");
                foreach (DataColumn Header in dtSource.Columns)
                {
                    // &amp;lt;Cell&amp;gt;
                    xtwWriter.WriteStartElement("Cell");
                    xtwWriter.WriteAttributeString("ss", "StyleID", null, "s16");

                    // &amp;lt;Data ss:Type="String"&amp;gt;xxx&amp;lt;/Data&amp;gt;
                    xtwWriter.WriteStartElement("Data");
                    xtwWriter.WriteAttributeString("ss", "Type", null, "String");
                    // Write content of cell
                    xtwWriter.WriteValue(Header.ColumnName);

                    // &amp;lt;/Data&amp;gt;
                    xtwWriter.WriteEndElement();

                    // &amp;lt;/Cell&amp;gt;
                    xtwWriter.WriteEndElement();
                }

                xtwWriter.WriteEndElement();


                foreach (DataRow row in dtSource.Rows)
                {
                    // &amp;lt;Row&amp;gt;
                    xtwWriter.WriteStartElement("Row");

                    // Run through all cell of current rows
                    foreach (object cellValue in row.ItemArray)
                    {
                        // &amp;lt;Cell&amp;gt;
                        xtwWriter.WriteStartElement("Cell");
                        //if (cnt == 0)
                        //    xtwWriter.WriteAttributeString("ss", "StyleID", null, "s16");

                        // &amp;lt;Data ss:Type="String"&amp;gt;xxx&amp;lt;/Data&amp;gt;
                        xtwWriter.WriteStartElement("Data");
                        xtwWriter.WriteAttributeString("ss", "Type", null, "String");
                        // Write content of cell
                        string strcellValue = (cellValue == System.DBNull.Value ? string.Empty : (string)cellValue);
                        xtwWriter.WriteValue(strcellValue);

                        // &amp;lt;/Data&amp;gt;
                        xtwWriter.WriteEndElement();

                        // &amp;lt;/Cell&amp;gt;
                        xtwWriter.WriteEndElement();
                    }
                    // &amp;lt;/Row&amp;gt;
                    xtwWriter.WriteEndElement();
                }
                // &amp;lt;/Table&amp;gt;
                xtwWriter.WriteEndElement();

                // &amp;lt;WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"&amp;gt;
                xtwWriter.WriteStartElement("WorksheetOptions", "urn:schemas-microsoft-com:office:excel");

                // Write settings of page
                xtwWriter.WriteStartElement("PageSetup");
                xtwWriter.WriteStartElement("Header");
                xtwWriter.WriteAttributeString("x", "Margin", null, "0.4921259845");
                xtwWriter.WriteEndElement();
                xtwWriter.WriteStartElement("Footer");
                xtwWriter.WriteAttributeString("x", "Margin", null, "0.4921259845");
                xtwWriter.WriteEndElement();
                xtwWriter.WriteStartElement("PageMargins");
                xtwWriter.WriteAttributeString("x", "Bottom", null, "0.984251969");
                xtwWriter.WriteAttributeString("x", "Left", null, "0.78740157499999996");
                xtwWriter.WriteAttributeString("x", "Right", null, "0.78740157499999996");
                xtwWriter.WriteAttributeString("x", "Top", null, "0.984251969");
                xtwWriter.WriteEndElement();
                xtwWriter.WriteEndElement();

                // &amp;lt;Selected/&amp;gt;
                xtwWriter.WriteElementString("Selected", null);

                // &amp;lt;Panes&amp;gt;
                xtwWriter.WriteStartElement("Panes");

                // &amp;lt;Pane&amp;gt;
                xtwWriter.WriteStartElement("Pane");

                // Write settings of active field
                xtwWriter.WriteElementString("Number", "1");
                xtwWriter.WriteElementString("ActiveRow", "1");
                xtwWriter.WriteElementString("ActiveCol", "1");

                // &amp;lt;/Pane&amp;gt;
                xtwWriter.WriteEndElement();

                // &amp;lt;/Panes&amp;gt;
                xtwWriter.WriteEndElement();

                // &amp;lt;ProtectObjects&amp;gt;False&amp;lt;/ProtectObjects&amp;gt;
                xtwWriter.WriteElementString("ProtectObjects", "False");

                // &amp;lt;ProtectScenarios&amp;gt;False&amp;lt;/ProtectScenarios&amp;gt;
                xtwWriter.WriteElementString("ProtectScenarios", "False");

                // &amp;lt;/WorksheetOptions&amp;gt;
                xtwWriter.WriteEndElement();

                // &amp;lt;/Worksheet&amp;gt;
                xtwWriter.WriteEndElement();

                // &amp;lt;/Workbook&amp;gt;
                xtwWriter.WriteEndElement();

                // Write file on hard disk
                xtwWriter.Flush();
                xtwWriter.Close();
            }
        }
    }


&lt;/pre&gt;
Write me if help full &lt;br /&gt;
Happy Coding..
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-2238299926162411627?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JpfxVMJl-U3opPiDNkukt5rKVIg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JpfxVMJl-U3opPiDNkukt5rKVIg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JpfxVMJl-U3opPiDNkukt5rKVIg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JpfxVMJl-U3opPiDNkukt5rKVIg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/jiZKawmvvbU/create-excel-file-from-datatable.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/11/create-excel-file-from-datatable.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-7732933990273164966</guid><pubDate>Fri, 18 Nov 2011 06:31:00 +0000</pubDate><atom:updated>2011-11-19T09:59:19.183+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">GridView</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>Scroll to particular record in GridView</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello Friends,&lt;br /&gt;
here is a tip to scroll the gridview to particular record.&lt;br /&gt;
the basic concept is html scrolling. to scroll at particular position create an anchor tag with name as address (eg. #ScrollPoint '# is must')&lt;br /&gt;
&lt;br /&gt;
now redirect the page to the location using javascript call&lt;br /&gt;
&lt;pre class="brush: html"&gt;window.location.href = "#ScrollPoint";&lt;/pre&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
same thing can be achieved by anchorlink href&lt;br /&gt;
here is sample code &lt;br /&gt;

&lt;br /&gt;
&lt;b&gt;HTML Page&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush: html"&gt;&amp;lt;asp:TextBox ID="TextBox2" runat="server"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
&amp;lt;asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return MoveTo();" /&amp;gt;
    &amp;lt;div style="height: 100px; overflow: auto;"&amp;gt;
        &amp;lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"&amp;gt;
            &amp;lt;Columns&amp;gt;
                &amp;lt;asp:TemplateField HeaderText="ID" SortExpression="ID"&amp;gt;
                    &amp;lt;EditItemTemplate&amp;gt;
                        &amp;lt;asp:TextBox ID="TextBox1" runat="server" Text='&amp;lt;%# Bind("ID") %&amp;gt;'&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                    &amp;lt;/EditItemTemplate&amp;gt;
                    &amp;lt;ItemTemplate&amp;gt;
                        &amp;lt;a name='&amp;lt;%# Eval("ID") %&amp;gt;'&amp;gt;&amp;lt;/a&amp;gt;
                        &amp;lt;asp:Label ID="Label1" runat="server" Text='&amp;lt;%# Bind("ID") %&amp;gt;'&amp;gt;&amp;lt;/asp:Label&amp;gt;
                    &amp;lt;/ItemTemplate&amp;gt;
                &amp;lt;/asp:TemplateField&amp;gt;
                &amp;lt;asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /&amp;gt;
            &amp;lt;/Columns&amp;gt;
        &amp;lt;/asp:GridView&amp;gt;
    &amp;lt;/div&amp;gt;  


&amp;lt;script type="text/javascript"&amp;gt;
        function MoveTo() {
            window.location.href = "#" + document.getElementById('&amp;lt;%= TextBox2.ClientID %&amp;gt;').value;
            return false;
        }
    &amp;lt;/script&amp;gt;

&lt;/pre&gt;
&lt;b&gt;Code Behind&lt;/b&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindControls();
            }
        }

        private void BindControls()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("ID");
            dt.Columns.Add("Name");
            for (int i = 0; i &amp;lt; 200; i++)
            {
                AddRow(dt);    
            }


            GridView1.DataSource = dt;
            GridView1.DataBind();

        }

        private static void AddRow(DataTable dt)
        {
            DataRow dr = dt.NewRow();
            dr["ID"] = dt.Rows.Count + 1;
            dr["Name"] = "Sandeep" + dt.Rows.Count + 1;
            dt.Rows.Add(dr);
        }
    }
&lt;/pre&gt;
Happy Coding...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-7732933990273164966?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5oC6ObnYRAIC68PLW9TOkigNH88/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5oC6ObnYRAIC68PLW9TOkigNH88/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5oC6ObnYRAIC68PLW9TOkigNH88/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5oC6ObnYRAIC68PLW9TOkigNH88/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/9JPWWGxsWt0/scroll-to-particular-record-in-gridview.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>2</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/11/scroll-to-particular-record-in-gridview.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-4007398616960607466</guid><pubDate>Wed, 14 Sep 2011 11:15:00 +0000</pubDate><atom:updated>2011-12-21T16:48:14.092+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">T-SQL</category><category domain="http://www.blogger.com/atom/ns#">CTE</category><title>Power of common table expression (CTE)</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello friends,&lt;br /&gt;
Recently I came across a case where I was supposed to generate report for Customer based on services availed to him and for that I used A common table expression (CTE) and it really impressed.&lt;br /&gt;
initially I referred this great document of MSDN &lt;a href="http://msdn.microsoft.com/en-us/library/ms190766.aspx" title="http://msdn.microsoft.com/en-us/library/ms190766.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms190766.aspx&lt;/a&gt;&lt;br /&gt;
here is my Table of data.(Actual Tables are not like this, I have managed a simplified Table for the Demo.) &lt;br /&gt;
&lt;a href="http://lh3.ggpht.com/-hQ58LF0IRIQ/TnCMtXLtt7I/AAAAAAAAAlg/L5POk7vwjTU/s1600-h/Original-Table-Sandeep4.png"&gt;&lt;img alt="Original Table Sandeep" border="0" height="183" src="http://lh6.ggpht.com/-sFSG4IB9NK8/TnCMuZDcbKI/AAAAAAAAAlk/AFXtfn9BtY4/Original-Table-Sandeep_thumb2.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Original Table Sandeep" width="433" /&gt;&lt;/a&gt;&lt;br /&gt;
Here is query to generate Table&lt;br /&gt;
&lt;pre class="brush: sql"&gt;declare @t table (id int identity,CustID int, AgreementName varchar(100), ServDate Datetime,Price float)
insert @t select 70       ,'First Agreement',CONVERT(datetime,'2011-01-05'),10
insert @t select 70       ,'Second Agreement',CONVERT(datetime,'2011-01-06'),10
insert @t select 75       ,'First Agreement',CONVERT(datetime,'2011-03-14'),10
insert @t select 70       ,'Second Agreement',CONVERT(datetime,'2011-01-05'),30
insert @t select 75       ,'Third Agreement',CONVERT(datetime,'2011-01-05'),10
insert @t select 90       ,'Third Agreement',CONVERT(datetime,'2011-04-16'),20
insert @t select 75       ,'Third Agreement',CONVERT(datetime,'2011-05-05'),10
insert @t select 90       ,'Third Agreement',CONVERT(datetime,'2011-02-20'),90
select * from @t
&lt;/pre&gt;
&lt;br /&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The scenario is to display Customer’s total bill based on the services availed to him according to Service Agreement and Date..&lt;br /&gt;
&lt;br /&gt;
And Expect out put is as follow&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/-80h87WbOg3Q/TnCMu6rOWlI/AAAAAAAAAlo/EXjqOnSREIM/s1600-h/Output%252520Table%252520Sandeep%25255B4%25255D.png"&gt;&lt;img alt="Output Table Sandeep" border="0" height="89" src="http://lh5.ggpht.com/-pGcmOiHjYfM/TnCMvkHKR9I/AAAAAAAAAls/J0zMw6cnrRs/Output%252520Table%252520Sandeep_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Output Table Sandeep" width="416" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For that I used the following query&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: sql"&gt;
;with cteTable(CustID,combined,inx,price)
as
(
select CustID,  AgreementName + ' ['+ CONVERT(varchar,ServDate,106)+']'                        
, inx=ROW_NUMBER() over (PARTITION by CustID order by AgreementName, ServDate),Price
from @t t
)
,cteConcate(CustID,finalstatus,inx,Price1)
as
(
select CustID, convert(varchar(max),combined), 1,(price) from cteTable where inx=1
union all
select cteConcate.CustID, convert(varchar(max),cteConcate.finalstatus+', '+cteTable.combined), cteConcate.inx+1, cteTable.price
from cteConcate
inner join cteTable on cteTable.CustID = cteConcate.CustID and cteTable.inx=cteConcate.inx+1

)
select CustID, MAX(finalstatus) Description ,sum(Price1) Price from cteConcate group by CustID


&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
if have any query please let me know.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding….&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-4007398616960607466?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wmzDeYAzD6qORDIy_fMdn0Rp1Os/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wmzDeYAzD6qORDIy_fMdn0Rp1Os/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wmzDeYAzD6qORDIy_fMdn0Rp1Os/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wmzDeYAzD6qORDIy_fMdn0Rp1Os/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/v8Q_PGF1Rqs/power-of-common-table-expression-cte.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-sFSG4IB9NK8/TnCMuZDcbKI/AAAAAAAAAlk/AFXtfn9BtY4/s72-c/Original-Table-Sandeep_thumb2.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/09/power-of-common-table-expression-cte.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-181711155352138020</guid><pubDate>Fri, 10 Jun 2011 10:47:00 +0000</pubDate><atom:updated>2011-06-10T20:22:11.983+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">usercontrol</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>Access UserControl from Page</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
Hi..&lt;br /&gt;
To perform some reparative operation in application, its preferred to use UserControls.&lt;br /&gt;
Not necessary to have same display and bindings at everyplace. In that case we need to set values or call methods or pass values accordingly.&lt;br /&gt;
Here I have tried to figure out three cases, Hope it is helpful.&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Pass Table to Usercontrol and Set dynamically value to Controls&lt;/li&gt;
&lt;li&gt;Set Properties of control&lt;/li&gt;
&lt;li&gt;Call Usercontrol's Methods&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: small;"&gt;Pass Table to Usercontrol and Set dynamically value to Controls&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Here in my case, I am passing Table to a Predefined Usercontrol, Which contains a GridView And on top a Label which is passed as Property of UserControl&lt;br /&gt;
It will look like this&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/-GvNrHJwuKn0/TfHvlnvyJ9I/AAAAAAAAAho/92hsv5U_hgA/s1600-h/1%25255B4%25255D.png"&gt;&lt;img alt="1" border="0" height="240" src="http://lh5.ggpht.com/-cErqyr5rlss/TfHvm9900lI/AAAAAAAAAhs/RaNqyQv5P-k/1_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="1" width="629" /&gt;&lt;/a&gt;&lt;br /&gt;
to code it try like this&lt;br /&gt;
Create a new Usercontrol page e.g. (DisplayControl.ascx)&lt;br /&gt;
The HTML will look like this&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:6d2d5fe1-b301-491f-9246-7748f4d440de" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;pre class="brush: html;"&gt;&amp;lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DisplayControl.ascx.cs"
    Inherits="UserControlSample.Controls.DisplayControl" %&amp;gt;
&amp;lt;center&amp;gt;
    &amp;lt;%= strTitle %&amp;gt;&amp;lt;/center&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;center&amp;gt;
    &amp;lt;asp:GridView ID="grdDisplay" runat="server" CellPadding="4" ForeColor="#333333"
        GridLines="None"&amp;gt;
        &amp;lt;AlternatingRowStyle BackColor="White" ForeColor="#284775" /&amp;gt;
        &amp;lt;EditRowStyle BackColor="#999999" /&amp;gt;
        &amp;lt;FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&amp;gt;
        &amp;lt;HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&amp;gt;
        &amp;lt;PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /&amp;gt;
        &amp;lt;RowStyle BackColor="#F7F6F3" ForeColor="#333333" /&amp;gt;
        &amp;lt;SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /&amp;gt;
        &amp;lt;SortedAscendingCellStyle BackColor="#E9E7E2" /&amp;gt;
        &amp;lt;SortedAscendingHeaderStyle BackColor="#506C8C" /&amp;gt;
        &amp;lt;SortedDescendingCellStyle BackColor="#FFFDF8" /&amp;gt;
        &amp;lt;SortedDescendingHeaderStyle BackColor="#6F8DAE" /&amp;gt;
    &amp;lt;/asp:GridView&amp;gt;
&amp;lt;/center&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
in DisplayControl.ascx.cs file code will be like this&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:a7d91d02-f8ac-4dde-9b12-ec1f69ec9ed0" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;pre class="brush: c#;"&gt; protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {                
                BindGrid();
            }
        }

        private void BindGrid()
        {
            grdDisplay.DataSource = DtTable;
            grdDisplay.DataBind();
        }
        public string strTitle { get; set; }
        public DataTable DtTable { get; set; }&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now on Page where the Usercontrol is going to be displayed.&lt;br /&gt;
&lt;br /&gt;
Here &lt;b&gt;strTitle="Display Page" &lt;/b&gt;sets Title for UserControl&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:ebf34b96-75b0-42a1-845e-1951fadfb8e8" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;pre class="brush: text;"&gt;&amp;lt;%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="UserControlSample._Default" %&amp;gt;

&amp;lt;%@ Register Src="Controls/DisplayControl.ascx" TagName="DisplayControl" TagPrefix="uc1" %&amp;gt;
&amp;lt;%@ Register Src="Controls/SetProperties.ascx" TagName="SetProperties" TagPrefix="uc2" %&amp;gt;
&amp;lt;%@ Register Src="Controls/AccessMethods.ascx" TagName="AccessMethods" TagPrefix="uc3" %&amp;gt;
&amp;lt;asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"&amp;gt;
&amp;lt;/asp:Content&amp;gt;
&amp;lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&amp;gt;
    &amp;lt;h1&amp;gt;
        Pass Table to Usercontrol and Set dynamically value to Controls&amp;lt;/h1&amp;gt;
    &amp;lt;hr /&amp;gt;
    &amp;lt;uc1:DisplayControl ID="DisplayControl1" runat="server" strTitle="Display Page" /&amp;gt;
  
&amp;lt;/asp:Content&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
on Code behind&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:7a23effb-1b01-4146-bf59-963b040a73e0" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;pre class="brush: css;"&gt;  protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DisplayControl1.DtTable = GetTable();            
            }
        }

        private DataTable GetTable()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("ID");
            dt.Columns.Add("Name");

            DataRow dr = dt.NewRow();
            dr["ID"] = dt.Rows.Count + 1;
            dr["Name"] = "Sandeep";
            dt.Rows.Add(dr);
            dr = dt.NewRow();
            dr["ID"] = dt.Rows.Count + 1;
            dr["Name"] = "Nilesh";
            dt.Rows.Add(dr);
            dr = dt.NewRow();
            dr["ID"] = dt.Rows.Count + 1;
            dr["Name"] = "Kamal";
            dt.Rows.Add(dr);
            dr = dt.NewRow();
            dr["ID"] = dt.Rows.Count + 1;
            dr["Name"] = "Esha";
            dt.Rows.Add(dr);

            return dt;
        }&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: small;"&gt;Set Properties of control&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Now Lets change property of any control of Usercontrol&lt;br /&gt;
&lt;br /&gt;
Here we will change the orientation of Login Control as “Vertical” / “Horizontal”&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lh4.ggpht.com/-iPP5vpa2w1I/TfHzkk-wUxI/AAAAAAAAAhw/FVoCyUAZevY/s1600-h/2%25255B4%25255D.png"&gt;&lt;img alt="2" border="0" height="110" src="http://lh4.ggpht.com/-SL6ikFcyPqo/TfHzoIeu33I/AAAAAAAAAh0/PdCOPH0IXrI/2_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="2" width="661" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The code on page where the control is called is &lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:d9de5edb-9d7f-48dc-a03c-528e1f92c0fe" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;pre class="brush: html;"&gt;&amp;lt;uc2:SetProperties ID="SetProperties1" runat="server" CtrlOrientation="Horizontal" /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Here CtrlOrientation is Property which will expect value of Orientation Class that is “Vertical” / “Horizontal”&lt;br /&gt;
&lt;br /&gt;
and on Usercontrol Drop &lt;b&gt;“Login”&lt;/b&gt; Control &lt;br /&gt;
&lt;br /&gt;
and in code &lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:2fff7970-84f7-4562-9cad-4234ea5cfc7d" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;pre class="brush: c#;"&gt;protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                Login1.Orientation = CtrlOrientation;
        }

        public Orientation CtrlOrientation { get; set; }&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: small;"&gt;Call Usercontrol's Methods&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Call method of Usercontrol from Page.&lt;br /&gt;
&lt;br /&gt;
Here I am binding same grid from Page.&lt;br /&gt;
&lt;br /&gt;
to achive this in Usercontrol cs page&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:0e0edf11-2108-4b2e-a6ee-2038e525187a" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;pre class="brush: c#;"&gt; public void BindGrid()
        {
            grdDisplay.DataSource = GetTable();
            grdDisplay.DataBind();
        }&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
here BindGrid() Method is public so we can access it from Page with Control.&lt;br /&gt;
&lt;br /&gt;
like &lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:967bdada-4cd5-4fb5-a947-672a456b69a1" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;pre class="brush: c#;"&gt;AccessMethods1.BindGrid();&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Download The &lt;a href="https://cid-552998535cb9985d.office.live.com/self.aspx/.Public/UserControlSample.zip"&gt;Source&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this help you..&lt;br /&gt;
&lt;br /&gt;
Enjoy Coding&lt;img alt="Smile" class="wlEmoticon wlEmoticon-smile" src="http://lh3.ggpht.com/-dS1Hba_9ydM/TfH1oQuY4LI/AAAAAAAAAh4/qjCHPYp6hwY/wlEmoticon-smile%25255B2%25255D.png?imgmax=800" style="border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-181711155352138020?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tQYbTWulkqhArA9e5dQMipXLrwA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tQYbTWulkqhArA9e5dQMipXLrwA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tQYbTWulkqhArA9e5dQMipXLrwA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tQYbTWulkqhArA9e5dQMipXLrwA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/DQqjgK76Tr8/access-usercontrol-from-page.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-cErqyr5rlss/TfHvm9900lI/AAAAAAAAAhs/RaNqyQv5P-k/s72-c/1_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/06/access-usercontrol-from-page.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-8714822338309470446</guid><pubDate>Mon, 06 Jun 2011 12:05:00 +0000</pubDate><atom:updated>2011-06-06T17:36:13.239+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Interview</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">T-SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>Set Default Value as Function to column of a Table</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello,&lt;br /&gt;
Generally we need to set default value to particular column in Database Table like &lt;i&gt;isActive &lt;/i&gt;is &lt;i&gt;true, IsDeleted &lt;/i&gt;is &lt;i&gt;false.&lt;/i&gt;&lt;br /&gt;
same way many times we set &lt;i&gt;CreatedOn &lt;/i&gt;Date as CurrentDate and that is by query of insert &lt;i&gt;GetDate().&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Static Values : &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Its very easy to set some static value as Default value for column and that is as follow :&lt;br /&gt;
&lt;a href="http://lh3.ggpht.com/-Q4t-uiuaPKs/TezCTJmWyxI/AAAAAAAAAhM/u8gd2NODvXo/s1600-h/Static5.png"&gt;&lt;img alt="Static" border="0" height="218" src="http://lh4.ggpht.com/-Kd5ryf_wzEM/TezCUWNOh0I/AAAAAAAAAhQ/ysaJq8lYoh0/Static_thumb3.png?imgmax=800" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Static" width="428" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: small;"&gt;Functions :&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Set Default Date for &lt;i&gt;Createdon&lt;/i&gt; Field as Follow :&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/-2_Yuk7OUYCU/TezCVnLrrEI/AAAAAAAAAhU/rLCb9W_cHLM/s1600-h/Date%25255B3%25255D.png"&gt;&lt;img alt="Date" border="0" height="214" src="http://lh3.ggpht.com/-4ZORUMEiwSQ/TezCXKtq2QI/AAAAAAAAAhY/Yi83hwYypfw/Date_thumb%25255B1%25255D.png?imgmax=800" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Date" width="429" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: small;"&gt;User Defined Functions : &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Set User Defined function as Default Value as follow:&lt;br /&gt;
In my case I am supposed to get Random Hexa Code for Color. so I Have created an User Defined function for that&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:c18ef657-3311-436c-834a-aefd2c153b14" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: sql;collapse:true;"&gt;CREATE FUNCTION [dbo].[GetRandomColorCode]
( 
)
RETURNS varchar(6)
AS
BEGIN
Declare @Color varchar(6)
 RETURN (SELECT MyNewID FROM dbo.MyNewID)
END&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Now set the function in columns as follow :&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lh5.ggpht.com/-yDUlqHlnFDo/TezCYgL6JuI/AAAAAAAAAhc/e8CrEvmNAHM/s1600-h/UserDefined%25255B3%25255D.png"&gt;&lt;img alt="UserDefined" border="0" height="188" src="http://lh3.ggpht.com/-fabZm86hLoo/TezCa0Y3ByI/AAAAAAAAAhg/nI0K_-PfyrU/UserDefined_thumb%25255B1%25255D.png?imgmax=800" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="UserDefined" width="424" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If this do not allow us to set Default value try following query to set&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:bb2b6884-144d-4090-96eb-9b60d4fa0daf" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: sql;"&gt;ALTER TABLE dbo.Table_1 ADD CONSTRAINT
 DF_Table_1_ColorCode DEFAULT ([dbo].[GetRandomColorCode]()) FOR ColorCode
GO&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
All the best&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding..&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-8714822338309470446?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N_Jml6yPc_MH0LiQj1Wwym9QTQo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N_Jml6yPc_MH0LiQj1Wwym9QTQo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N_Jml6yPc_MH0LiQj1Wwym9QTQo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N_Jml6yPc_MH0LiQj1Wwym9QTQo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/3xbxz7R9_Q8/set-default-value-as-function-to-column.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-Kd5ryf_wzEM/TezCUWNOh0I/AAAAAAAAAhQ/ysaJq8lYoh0/s72-c/Static_thumb3.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/06/set-default-value-as-function-to-column.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-5187263985005064850</guid><pubDate>Thu, 26 May 2011 13:42:00 +0000</pubDate><atom:updated>2011-05-26T19:13:42.431+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">Error Handling</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>Track Error in Javascript Page</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
Hi &lt;br /&gt;
Many times we have faced problems to find what is javascript errors and exactly where??&lt;br /&gt;
To track javascript error, It is a good practice to write code in &lt;b&gt;Try..Catch&lt;/b&gt;&lt;br /&gt;
but sometimes some small syntax error are not allowing to execute the whole js file.&lt;br /&gt;
so to track such error during development, we can track by this sample code&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:60a3e2a4-052b-4ff1-b114-51a3a5fd69a9" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: javascript;"&gt;  &amp;lt;script type="text/javascript"&amp;gt;
        onerror = CallOnError;
        function CallOnError(msg, url, line) {
            var strErrMessage = "";
            strErrMessage += "Message: " + msg + "\n";
            strErrMessage += "Page: " + url + "\n";
            strErrMessage += "Line Number: " + line + "\n\n";
            alert(strErrMessage);
            return true;
        }
    &amp;lt;/script&amp;gt;
  &lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Here is a sample error &lt;br /&gt;
&lt;br /&gt;
try to put on your page &lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:132dc33b-58b9-449f-91a7-e378c03a8c37" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: javascript;"&gt;  &amp;lt;script type="text/javascript"&amp;gt;
            alert('This is First Test Page);
    &amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Enjoy Coding&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-5187263985005064850?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3hyoHk56s7IX1yKgFhmrOKg0Cnk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3hyoHk56s7IX1yKgFhmrOKg0Cnk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3hyoHk56s7IX1yKgFhmrOKg0Cnk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3hyoHk56s7IX1yKgFhmrOKg0Cnk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/rti3IrmEw-c/track-error-in-javascript-page.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/05/track-error-in-javascript-page.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-6799579164619616644</guid><pubDate>Mon, 16 May 2011 09:29:00 +0000</pubDate><atom:updated>2011-05-16T14:59:18.422+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Interview</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">T-SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>Second Highest Salary- Sql Query</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:a3d8bcb7-fb6c-4018-836d-1358f667d6a9" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: sql;collapse:true;"&gt;Create Table #Emp(id int identity primary key,
    Emp varchar(100),
    Salary int)

insert into #Emp
select 'XXXX',17000 union all
select 'DDDD',21000 union all
select 'WWWW',30000 union All
Select 'HHHH',21000 union All
select 'CCCC',30000 union All
Select 'TTTT',21000 union All
SElect 'PPPP',21000

select * from #Emp

select #Emp.* 
from (select ROW_NUMBER() over (order by salary desc) as RowNumber, Salary
   from #Emp
    group by Salary) as tempEmp inner join #Emp on tempEmp.Salary = #Emp.Salary
   where tempEmp.RowNumber=2

Drop Table #Emp&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Data Will Look like this&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lh5.ggpht.com/_-7eTu68KmOU/Tcu9dDr9IXI/AAAAAAAAAgk/eYMDbHh2Tag/s1600-h/Data%5B2%5D.png"&gt;&lt;img alt="Data" border="0" height="171" src="http://lh5.ggpht.com/_-7eTu68KmOU/Tcu9eZEc-fI/AAAAAAAAAgo/YlO6VpgZ5s4/Data_thumb.png?imgmax=800" style="background-image: none; border: 0px none; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Data" width="180" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Output will be like this&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lh4.ggpht.com/_-7eTu68KmOU/Tcu9fPnc56I/AAAAAAAAAgs/jkP-HOXuMJs/s1600-h/Output%5B2%5D.png"&gt;&lt;img alt="Output" border="0" height="110" src="http://lh4.ggpht.com/_-7eTu68KmOU/Tcu9gLMkfKI/AAAAAAAAAgw/IrOtvR9sdSI/Output_thumb.png?imgmax=800" style="background-image: none; border: 0px none; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Output" width="179" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-6799579164619616644?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LHzHuBTQZ_Lvyk4b8aauIsNBHxk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LHzHuBTQZ_Lvyk4b8aauIsNBHxk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LHzHuBTQZ_Lvyk4b8aauIsNBHxk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LHzHuBTQZ_Lvyk4b8aauIsNBHxk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/UTGxamsIEpg/second-highest-salary-sql-query.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_-7eTu68KmOU/Tcu9eZEc-fI/AAAAAAAAAgo/YlO6VpgZ5s4/s72-c/Data_thumb.png?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/05/second-highest-salary-sql-query.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-4638136830728151269</guid><pubDate>Fri, 29 Apr 2011 12:30:00 +0000</pubDate><atom:updated>2011-05-02T15:40:35.100+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">Security</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><category domain="http://www.blogger.com/atom/ns#">Image</category><title>Protect image from being copied</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello Friends,&lt;br /&gt;
&lt;br /&gt;
Many times I am asked to protect some copyrighted images over web,&lt;br /&gt;
so finally I have found a better way to protect from being copied.&lt;br /&gt;
There are some cases by which we can copy the image&lt;br /&gt;
Here I have taken care of following cases&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Right click on image and Save the Image  &lt;/li&gt;
&lt;li&gt;Save the Entire page and all images displayed on page will be downloaded to its Data Folder  &lt;/li&gt;
&lt;li&gt;in mozila Firefox, We can save the media files by following steps  &lt;ol&gt;
&lt;li&gt;Right click on Page, select “View Page Info”  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://lh6.ggpht.com/_-7eTu68KmOU/TbqszVFK8YI/AAAAAAAAAgU/J5M81masBQw/s1600-h/ViewSourceSandeep%5B2%5D.png"&gt;&lt;img alt="ViewSourceSandeep" border="0" height="244" src="http://lh6.ggpht.com/_-7eTu68KmOU/Tbqs0RqSBXI/AAAAAAAAAgY/fHAq-_yAg0s/ViewSourceSandeep_thumb.png?imgmax=800" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="ViewSourceSandeep" width="193" /&gt;&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;It will open a window, Select “Media” tab, here a list of all files will be available  &lt;/li&gt;
&lt;li&gt;select particular file and click on “Save As” button to save the media  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://lh3.ggpht.com/_-7eTu68KmOU/Tbqs15nVLcI/AAAAAAAAAgc/UeWUkTQlLUs/s1600-h/SavemediaSandeep%5B2%5D.png"&gt;&lt;img alt="SavemediaSandeep" border="0" height="220" src="http://lh3.ggpht.com/_-7eTu68KmOU/Tbqs3bKXV2I/AAAAAAAAAgg/meIe2CfhsBA/SavemediaSandeep_thumb.png?imgmax=800" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="SavemediaSandeep" width="244" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
Now Let’s Start our main topic,that is protect image from being copied&lt;br /&gt;
There is a concept called &lt;a href="http://en.wikipedia.org/wiki/Data_URI_scheme" target="_blank" title="Data URI scheme"&gt;Data URI scheme&lt;/a&gt;. &lt;br /&gt;
Generally to display any image on page, we use Relative_URL and if we display image using this, the images can be easily copied.&lt;br /&gt;
Here we will save image in database and retrieve the same &lt;br /&gt;
To Create table &lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:6e22e35e-2d58-4523-93b5-1c78bcde8adb" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: sql;"&gt;
CREATE TABLE [dbo].[Images](
 [ImageID] [int] IDENTITY(1,1) NOT NULL,
 [ImageName] [varchar](50) NULL,
 [Image] [image] NULL,
 [ext] [varchar](50) NULL,
 CONSTRAINT [PK_Images] PRIMARY KEY CLUSTERED 
(
 [ImageID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Now, &lt;br /&gt;
&lt;br /&gt;
the aspx page will be very simple like&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:92159899-4d11-44f9-8fec-5840d7849330" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: html;"&gt;&amp;lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&amp;gt;
    &amp;lt;table&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;
                Name
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;asp:TextBox ID="txtName" runat="server" ValidationGroup="Uploadgrp"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;asp:RequiredFieldValidator ID="rfvdName" runat="server" ControlToValidate="txtName"
                    ValidationGroup="Uploadgrp" ErrorMessage="*"&amp;gt;&amp;lt;/asp:RequiredFieldValidator&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;
                Image
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;asp:FileUpload ID="flImgUpload" runat="server" /&amp;gt;
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;amp;nbsp;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;        
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;asp:Button ID="btnUpload" ValidationGroup="Uploadgrp" runat="server" OnClick="btnUpload_Click"
                    Text="Upload " /&amp;gt;
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;amp;nbsp;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;asp:Label ID="lblMessage" runat="server"&amp;gt;&amp;lt;/asp:Label&amp;gt;
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;amp;nbsp;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
    &amp;lt;/table&amp;gt;
    &amp;lt;table&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;asp:Button ID="btnFetch" runat="server" OnClick="btnFetch_Click" Text="Fetch the Last image" /&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;img oncontextmenu="return false;" runat="server" id="imgDisplay" style="width: 400px; height: 400px;" /&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
    &amp;lt;/table&amp;gt;
&amp;lt;/asp:Content&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
here&amp;nbsp; &lt;b&gt;oncontextmenu="return false;" &lt;/b&gt;using this line of code you can prevent right click on image.&lt;br /&gt;
&lt;br /&gt;
This will protect image to save by right click&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:a7c9ff18-176c-4bf0-913f-6226052f819b" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: c#;"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;

namespace TestRequest
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btnFetch_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection();
            con.ConnectionString = ConfigurationManager.ConnectionStrings["TestBlogConnectionString1"].ConnectionString;
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select top 1 ImageName,Image,ext From Images order by imageid desc ";
            cmd.CommandType = CommandType.Text;
            cmd.Connection = con;
            con.Open();
            SqlDataReader rd = cmd.ExecuteReader();
            rd.Read();
            imgDisplay.Src = GetBase64Image((byte[])rd["Image"], (string)rd["ext"]);
            con.Close();
        }
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            string strImageName = txtName.Text.ToString();
            if (flImgUpload.PostedFile != null &amp;amp;&amp;amp; flImgUpload.PostedFile.FileName != "")
            {
                byte[] imageSize = new byte[flImgUpload.PostedFile.ContentLength];
                HttpPostedFile uploadedImage = flImgUpload.PostedFile;
                string strext = flImgUpload.FileName.Substring(flImgUpload.FileName.LastIndexOf(".") + 1).ToLower();
                uploadedImage.InputStream.Read(imageSize, 0, (int)flImgUpload.PostedFile.ContentLength);

                SqlConnection con = new SqlConnection();
                con.ConnectionString = ConfigurationManager.ConnectionStrings["TestBlogConnectionString1"].ConnectionString;

                SqlCommand cmd = new SqlCommand();
                cmd.CommandText = "INSERT INTO Images(ImageName,Image,Ext)  VALUES (@ImageName,@Image,@ext)";
                cmd.CommandType = CommandType.Text;
                cmd.Connection = con;

                SqlParameter ImageName = new SqlParameter("@ImageName", SqlDbType.VarChar, 50);
                ImageName.Value = strImageName.ToString();
                cmd.Parameters.Add(ImageName);

                SqlParameter UploadedImage = new SqlParameter("@Image", SqlDbType.Image, imageSize.Length);
                UploadedImage.Value = imageSize;
                cmd.Parameters.Add(UploadedImage);

                SqlParameter Ext = new SqlParameter("@Ext", SqlDbType.VarChar, 50);
                Ext.Value = strext;
                cmd.Parameters.Add(Ext);

                con.Open();
                int result = cmd.ExecuteNonQuery();
                con.Close();
                if (result &amp;gt; 0)
                    lblMessage.Text = "File Uploaded";
                txtName.Text = string.Empty;
            }
        }

      
        private string GetBase64Image(byte[] data, string ext)
        {
            string binaryRepresenatation = string.Concat("data:image/" + ext + ";base64,", Convert.ToBase64String(data));
            return binaryRepresenatation;
        }
    }
}&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
the main game is &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:fac28344-4b31-41ef-a89b-fb1a9846498c" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
&lt;pre class="brush: c#;"&gt; private string GetBase64Image(byte[] data, string ext)
        {
            string binaryRepresenatation = string.Concat("data:image/" + ext + ";base64,", Convert.ToBase64String(data));
            return binaryRepresenatation;
        }&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
it will generate base64 format of byte[] of Image. and using &lt;a href="http://en.wikipedia.org/wiki/Data_URI_scheme" target="_blank" title="Data URI scheme"&gt;Data URI scheme&lt;/a&gt; it generates image by CSS…&lt;/div&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
this is very common to implement and will help to protect image &lt;br /&gt;
&lt;br /&gt;
click here to download the &lt;a href="https://cid-552998535cb9985d.office.live.com/self.aspx/.Public/TestRequest.zip"&gt;source&lt;/a&gt;&lt;br /&gt;
All the best &lt;/div&gt;
&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;
Sandeep Prajapati&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-4638136830728151269?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q1vQy1nZGE91-gEyAlPup33kQ-k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q1vQy1nZGE91-gEyAlPup33kQ-k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Q1vQy1nZGE91-gEyAlPup33kQ-k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q1vQy1nZGE91-gEyAlPup33kQ-k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/_LDgi8NIu7E/protect-image-from-being-copied.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_-7eTu68KmOU/Tbqs0RqSBXI/AAAAAAAAAgY/fHAq-_yAg0s/s72-c/ViewSourceSandeep_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/04/protect-image-from-being-copied.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-545047745706069826</guid><pubDate>Mon, 04 Apr 2011 13:22:00 +0000</pubDate><atom:updated>2011-04-04T18:54:22.202+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Stored Procedure</category><category domain="http://www.blogger.com/atom/ns#">Repeater</category><category domain="http://www.blogger.com/atom/ns#">GridView</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><category domain="http://www.blogger.com/atom/ns#">LINQ</category><title>Fetch Data from Control Without Loop- Best Use of LINQ</title><description>&lt;p&gt;Hi friends….&lt;/p&gt; &lt;p&gt;Many times I need to generate collection type Data from GridView or Repeater or any other control.. and in that case I used to loop through each rowitem of particular control..&lt;/p&gt; &lt;p&gt;here each row of repeater is listitem of LINQ query.&lt;/p&gt; &lt;p&gt;same way you can perform for all DataBound Controls like GridView, Repeater, DataList, DropDownlist, CheckboxList, Radiobuttonlist etc…&lt;/p&gt; &lt;p&gt;but after using &lt;a href="http://msdn.microsoft.com/en-us/netframework/aa904594" target="_blank"&gt;LINQ&lt;/a&gt;, I am able to do that very easily&lt;/p&gt; &lt;p&gt;here is sample of Repeater control to Get List of data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;List&amp;lt;ctrlInfo&amp;gt; ctrls = (from item &lt;span class="kwrd"&gt;in&lt;/span&gt; rptctrlList.Items.Cast&amp;lt;RepeaterItem&amp;gt;()&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;where&lt;/span&gt; ((CheckBox)item.FindControl(&lt;span class="str"&gt;"chkctrl"&lt;/span&gt;)).Checked&lt;/pre&gt;&lt;pre class="alt"&gt;            select &lt;span class="kwrd"&gt;new&lt;/span&gt; ctrlInfo(){&lt;/pre&gt;&lt;pre&gt;                ctrlId = Convert.ToInt32(((HiddenField)item.FindControl(&lt;span class="str"&gt;"hdnctrlId"&lt;/span&gt;)).Value),                          &lt;/pre&gt;&lt;pre class="alt"&gt;                UserctrlId = Convert.ToInt64(((HiddenField)item.FindControl(&lt;span class="str"&gt;"hdnUserctrlId"&lt;/span&gt;)).Value),&lt;/pre&gt;&lt;pre&gt;            }).ToList();&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;now I can pass XML to database from this List&amp;lt;ctrlInfo&amp;gt; using&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;XElement ctrlsXML = &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"ctrls"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;            var ctrlXML = from ctrl &lt;span class="kwrd"&gt;in&lt;/span&gt; ctrls&lt;/pre&gt;&lt;pre class="alt"&gt;                           select &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"ctrl"&lt;/span&gt;,&lt;/pre&gt;&lt;pre&gt;                              &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"UserId"&lt;/span&gt;, ctrl.UserId),&lt;/pre&gt;&lt;pre class="alt"&gt;                              &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"ctrlId"&lt;/span&gt;, ctrl.ctrlId),&lt;/pre&gt;&lt;pre&gt;                              &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"UserctrlId"&lt;/span&gt;, ctrl.UserctrlId));&lt;/pre&gt;&lt;pre class="alt"&gt;            ctrlsXML.Add(ctrlXML);&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now…. You can pass the XML to Stored Procedure. and in Stored Procedure&lt;/p&gt;&lt;br /&gt;&lt;p&gt;using &lt;/p&gt;&lt;br /&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;                c.&lt;span class="kwrd"&gt;value&lt;/span&gt;(&lt;span class="str"&gt;'ctrlId[1]'&lt;/span&gt;,&lt;span class="str"&gt;'int'&lt;/span&gt;) &lt;span class="kwrd"&gt;As&lt;/span&gt; ctrlId&lt;/pre&gt;&lt;pre class="alt"&gt;                , c.&lt;span class="kwrd"&gt;value&lt;/span&gt;(&lt;span class="str"&gt;'UserId[1]'&lt;/span&gt;,&lt;span class="str"&gt;'BigInt'&lt;/span&gt;) &lt;span class="kwrd"&gt;As&lt;/span&gt; UserId&lt;/pre&gt;&lt;pre&gt;                , c.&lt;span class="kwrd"&gt;value&lt;/span&gt;(&lt;span class="str"&gt;'UserctrlId[1]'&lt;/span&gt;,&lt;span class="str"&gt;'BigInt'&lt;/span&gt;) &lt;span class="kwrd"&gt;As&lt;/span&gt; UserctrlId&lt;/pre&gt;&lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;FROM&lt;/span&gt; @ctrlIdListXML.nodes(&lt;span class="str"&gt;'/ctrls/ctrl'&lt;/span&gt;)e(c)&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;you can have Table of selected records of Repeater control.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;using &lt;a href="http://technet.microsoft.com/en-us/library/bb510625.aspx" target="_blank"&gt;merge statement&lt;/a&gt; you can perform operation.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Hope this Helps &lt;/p&gt;&lt;br /&gt;&lt;p&gt;All the Best &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-545047745706069826?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a-VPFJBu7sjgqiRAYbwCrLkFYcQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a-VPFJBu7sjgqiRAYbwCrLkFYcQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a-VPFJBu7sjgqiRAYbwCrLkFYcQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a-VPFJBu7sjgqiRAYbwCrLkFYcQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/dSN285VLH_8/fetch-data-from-control-without-loop.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/04/fetch-data-from-control-without-loop.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-8476118806050585423</guid><pubDate>Fri, 01 Apr 2011 05:00:00 +0000</pubDate><atom:updated>2011-04-01T10:32:10.956+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS</category><category domain="http://www.blogger.com/atom/ns#">Image</category><title>Apply Frame to Image with CSS</title><description>&lt;p&gt;Hello &lt;/p&gt; &lt;p&gt;Many times we need to display image like profile image or advertisements &lt;/p&gt; &lt;p&gt;and at that time we need to decorate it within frame…&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Here we have a simplest way to apply frame which will help to set frame to any size image and unique for all..&lt;/p&gt; &lt;p&gt;here I have a sample code for it&lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;img {&lt;/pre&gt;&lt;pre class="alt"&gt;    background: url("shadow.gif") no-repeat scroll right bottom transparent;&lt;/pre&gt;&lt;pre&gt;    border-color: #EEEEEE -moz-use-text-color -moz-use-text-color #EEEEEE;&lt;/pre&gt;&lt;pre class="alt"&gt;    border-right: medium none;&lt;/pre&gt;&lt;pre&gt;    border-style: solid none none solid;&lt;/pre&gt;&lt;pre class="alt"&gt;    border-width: 1px medium medium 1px;&lt;/pre&gt;&lt;pre&gt;    padding: 4px 10px 10px 4px;}&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;='http://4.bp.blogspot.com/-AopW7qPMKPg/TX_vr-QT8CI/AAAAAAAAAe4/MwMlaUa3-1g/s220/Sandeep.JPG'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;and the you can have any kind of frame image &lt;/p&gt;&lt;br /&gt;&lt;p&gt;here I am uploading a sample image&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_-7eTu68KmOU/TZVbzxem73I/AAAAAAAAAfY/SD9QPYaF-ZY/s1600-h/shadow%5B2%5D.gif"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="shadow" border="0" alt="shadow" src="http://lh5.ggpht.com/_-7eTu68KmOU/TZVb09Q4-cI/AAAAAAAAAfc/vOezYkRBUB4/shadow_thumb.gif?imgmax=800" width="244" height="244"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;and the output you will get is&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_-7eTu68KmOU/TZVcTjBKoJI/AAAAAAAAAfo/U8JzXeK9K3s/s1600-h/output%5B5%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="output" border="0" alt="output" src="http://lh3.ggpht.com/_-7eTu68KmOU/TZVcUceI19I/AAAAAAAAAfs/Gr24OnNDf4o/output_thumb%5B1%5D.png?imgmax=800" width="235" height="244"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;All the Best&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-8476118806050585423?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LLURwZNyYal55RZPdgrDLYayvmQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LLURwZNyYal55RZPdgrDLYayvmQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LLURwZNyYal55RZPdgrDLYayvmQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LLURwZNyYal55RZPdgrDLYayvmQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/jAf-xcCejkA/apply-frame-to-image-with-css.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_-7eTu68KmOU/TZVb09Q4-cI/AAAAAAAAAfc/vOezYkRBUB4/s72-c/shadow_thumb.gif?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/04/apply-frame-to-image-with-css.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-6469359829051692892</guid><pubDate>Mon, 07 Mar 2011 11:40:00 +0000</pubDate><atom:updated>2011-04-01T10:44:53.664+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Web Service</category><category domain="http://www.blogger.com/atom/ns#">IIS</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>Publish webservice locally without separate hosting</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hi..&lt;br /&gt;
&lt;br /&gt;
here is a way to deploy web service withing project...&lt;br /&gt;
Here are the steps for it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in your Project... right click on Project in Solution Explorer.&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
Click on Add new Item and Select "Web Service"&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh3.googleusercontent.com/-aufx1MyU7ls/TXTPrtkAe9I/AAAAAAAAAeU/WOuStPoe97A/s1600/Add+Service.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="384" src="https://lh3.googleusercontent.com/-aufx1MyU7ls/TXTPrtkAe9I/AAAAAAAAAeU/WOuStPoe97A/s640/Add+Service.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Name it as per required... and Click on "Add" Button...&lt;br /&gt;
&lt;br /&gt;
now you have your web service ready in local environment...&lt;br /&gt;
&lt;br /&gt;
put you code in Web Service .Cs file&lt;br /&gt;
&lt;br /&gt;
Build the Source and make sure its error free...&lt;br /&gt;
&lt;br /&gt;
now Deployment Part&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right click on "References" in Solution Exporer,&lt;br /&gt;
&lt;br /&gt;
You will find.. three Options like&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Reference&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Web Reference&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Service Reference&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh4.googleusercontent.com/-5neL8ZEYdo0/TXTQHiQVk_I/AAAAAAAAAeY/uoGCrQNANWI/s1600/Reference.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://lh4.googleusercontent.com/-5neL8ZEYdo0/TXTQHiQVk_I/AAAAAAAAAeY/uoGCrQNANWI/s1600/Reference.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Select "Add Web Reference",&lt;br /&gt;
&lt;br /&gt;
you will get a Pop up,&lt;br /&gt;
&lt;br /&gt;
in Below there are three links&lt;br /&gt;
Browse to:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; * Web services in this solution&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; * Web services on the local machine&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; * Browse UDDI Servers on the local network&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh4.googleusercontent.com/-TQebbPAno1A/TXTQdzSwKVI/AAAAAAAAAec/XktlPnyoD6I/s1600/Reference.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="https://lh4.googleusercontent.com/-TQebbPAno1A/TXTQdzSwKVI/AAAAAAAAAec/XktlPnyoD6I/s320/Reference.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select "Web services on the local machine "&lt;br /&gt;
&lt;br /&gt;
You will get a list of Web Services existsing on your local machine&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh3.googleusercontent.com/-nOI0ceUW4oQ/TXTRnTIJ3XI/AAAAAAAAAeg/SFZKbzLNw8k/s1600/Rfe.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="https://lh3.googleusercontent.com/-nOI0ceUW4oQ/TXTRnTIJ3XI/AAAAAAAAAeg/SFZKbzLNw8k/s320/Rfe.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
select which one you created in current Project&lt;br /&gt;
&lt;br /&gt;
it will be something like&lt;br /&gt;
&lt;br /&gt;
http://localhost/TempProject/WebService1.asmx&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh4.googleusercontent.com/-rv66Z3jWH5k/TXTSD6i4psI/AAAAAAAAAek/9n-9KmmrmOs/s1600/Methods.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="https://lh4.googleusercontent.com/-rv66Z3jWH5k/TXTSD6i4psI/AAAAAAAAAek/9n-9KmmrmOs/s320/Methods.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
now you will get a list of your methods of the web Service..&lt;br /&gt;
&lt;br /&gt;
if till here everything is fine... that means you are going right....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Congratulations&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
At right side, in Web Reference Name if wish change the name , that name will be the Service name..&lt;br /&gt;
&lt;br /&gt;
now click on "Add Reference"&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh3.googleusercontent.com/-heQYJzMttck/TXTTOA3KlkI/AAAAAAAAAeo/xTM9_Hi5JB0/s1600/ServiceName.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="https://lh3.googleusercontent.com/-heQYJzMttck/TXTTOA3KlkI/AAAAAAAAAeo/xTM9_Hi5JB0/s320/ServiceName.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
now in your project you are able to run your service within your IIS.. without any external Deployment&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh4.googleusercontent.com/-c6Z_FAp_oRQ/TXTUN2j40qI/AAAAAAAAAes/vaL0uIosm-g/s1600/Access+Service.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="73" src="https://lh4.googleusercontent.com/-c6Z_FAp_oRQ/TXTUN2j40qI/AAAAAAAAAes/vaL0uIosm-g/s400/Access+Service.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now whenever you update the Source of Service class... before building the source one update the Service Reference by right click on Service in &lt;b&gt;Web reference Folder&lt;/b&gt; in solution explorer..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change url of your Service...&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt; Remove Url Value from Settings.&lt;/li&gt;
&lt;/ol&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Steps&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style="text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh4.googleusercontent.com/-3etn-EQkacA/TXTW00-Y2UI/AAAAAAAAAew/TvyuiP0tdgo/s1600/Settings+Path.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="56" src="https://lh4.googleusercontent.com/-3etn-EQkacA/TXTW00-Y2UI/AAAAAAAAAew/TvyuiP0tdgo/s400/Settings+Path.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;In Solution Explorer, In &lt;b&gt;Properties Folder&lt;/b&gt;, double click on &lt;b&gt;Settings.settings&lt;/b&gt; file&lt;/li&gt;
&lt;li&gt;remove the path.&lt;/li&gt;
&lt;li&gt;Now in Web.Config file set your Server path Instead of &lt;b&gt;localhost&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://lh3.googleusercontent.com/--QLRImQEOJg/TXTXVpKMH7I/AAAAAAAAAe0/-Ld7qcn7FkM/s1600/WebConfigPath.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="75" src="https://lh3.googleusercontent.com/--QLRImQEOJg/TXTXVpKMH7I/AAAAAAAAAe0/-Ld7qcn7FkM/s400/WebConfigPath.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now world is yours...&lt;br /&gt;
&lt;br /&gt;
All The Best&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-6469359829051692892?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Yjkt3Q0T5xkPgWtpCJ3rdqzHHhw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Yjkt3Q0T5xkPgWtpCJ3rdqzHHhw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Yjkt3Q0T5xkPgWtpCJ3rdqzHHhw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Yjkt3Q0T5xkPgWtpCJ3rdqzHHhw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/RBFRSmI-j6k/publish-webservice-locally-without-iis.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh3.googleusercontent.com/-aufx1MyU7ls/TXTPrtkAe9I/AAAAAAAAAeU/WOuStPoe97A/s72-c/Add+Service.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2011/03/publish-webservice-locally-without-iis.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-7154778798162920917</guid><pubDate>Sun, 17 Oct 2010 20:02:00 +0000</pubDate><atom:updated>2011-04-01T10:45:47.240+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">GridView</category><category domain="http://www.blogger.com/atom/ns#">CSS</category><title>Select Multiple Checkbox with Shift key in Gridview by javascript</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello Friends,&lt;br /&gt;
Recently i was just looking at my Gridview where i have a checkbox in each row.. now i need to select all Check box.. for that lots of material is available on net..&lt;br /&gt;
and all are enough so i am not going to deep in it&lt;br /&gt;
check out this… &lt;a href="http://www.codeproject.com/KB/grid/GridCheckBox.aspx" title="http://www.codeproject.com/KB/grid/GridCheckBox.aspx"&gt;http://www.codeproject.com/KB/grid/GridCheckBox.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
but now my problem was that i wanted to select few rows but not all &lt;br /&gt;
let’s say in my gridview the number of records are around 100.. and i want to check the checkbox of first 35 records&lt;br /&gt;
in that case i had to click on checkbox of all 35 rows. &lt;br /&gt;
i thought, like all mail accounts like gmail, yahoo, live and in may more…&lt;br /&gt;
i should be able to select multiple records by shift key.&lt;br /&gt;
means select the first record and pressing shift key select the 35st record so all the records in between will be selected..&lt;br /&gt;
and for that i found lots of jquery or any other javascripts.&lt;br /&gt;
but here i have tried to make something my own and i am happy to make it..&lt;br /&gt;
&lt;a href="http://lh5.ggpht.com/_-7eTu68KmOU/TLtWWpPfv7I/AAAAAAAAAdI/c4YV92Vz2n0/s1600-h/First%20With%20Shift%5B2%5D.jpg"&gt;&lt;img alt="First With Shift" border="0" height="244" src="http://lh3.ggpht.com/_-7eTu68KmOU/TLtWYYDOGsI/AAAAAAAAAdM/F2xSRqP3mzA/First%20With%20Shift_thumb.jpg?imgmax=800" style="border-width: 0px; display: inline;" title="First With Shift" width="81" /&gt;&lt;/a&gt; &lt;a href="http://lh4.ggpht.com/_-7eTu68KmOU/TLtWarRikhI/AAAAAAAAAdQ/0HEbGObq-pQ/s1600-h/Secod%20with%20Shift%5B2%5D.jpg"&gt;&lt;img alt="Secod with Shift" border="0" height="244" src="http://lh4.ggpht.com/_-7eTu68KmOU/TLtWcrLS6VI/AAAAAAAAAdU/i-5ST2j5VFw/Secod%20with%20Shift_thumb.jpg?imgmax=800" style="border-width: 0px; display: inline;" title="Secod with Shift" width="100" /&gt;&lt;/a&gt; &lt;a href="http://lh4.ggpht.com/_-7eTu68KmOU/TLtWefz3xMI/AAAAAAAAAdY/YchtvQfi3Zk/s1600-h/Selected%20with%20shift%5B2%5D.jpg"&gt;&lt;img alt="Selected with shift" border="0" height="244" src="http://lh6.ggpht.com/_-7eTu68KmOU/TLtWgNU6bjI/AAAAAAAAAdc/4O1JA5n6vv4/Selected%20with%20shift_thumb.jpg?imgmax=800" style="border-width: 0px; display: inline;" title="Selected with shift" width="89" /&gt;&lt;/a&gt;&lt;br /&gt;
here is code &lt;br /&gt;
&lt;br /&gt;
on Page&lt;br /&gt;
&lt;div class="csharpcode-wrapper" id="codeSnippetWrapper"&gt;
&lt;pre class="csharpcode" id="codeSnippet"&gt;&amp;lt;asp:GridView ID=&lt;span class="str"&gt;"GridView1"&lt;/span&gt; runat=&lt;span class="str"&gt;"server"&lt;/span&gt; AutoGenerateColumns=&lt;span class="str"&gt;"False"&lt;/span&gt;&amp;gt;
        &amp;lt;Columns&amp;gt;
            &amp;lt;asp:BoundField DataField=&lt;span class="str"&gt;"ID"&lt;/span&gt; HeaderText=&lt;span class="str"&gt;"Id"&lt;/span&gt; /&amp;gt;
            &amp;lt;asp:BoundField DataField=&lt;span class="str"&gt;"Name"&lt;/span&gt; HeaderText=&lt;span class="str"&gt;"Name"&lt;/span&gt; /&amp;gt;
            &amp;lt;asp:TemplateField&amp;gt;
                &amp;lt;ItemTemplate&amp;gt;
                    &amp;lt;asp:CheckBox ID=&lt;span class="str"&gt;"CheckBox1"&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="csharpcode" id="codeSnippet"&gt;onclick=&lt;span class="str"&gt;"CheckAllCheckbox(document.getElementById('ctl00_ContentPlaceHolder1_GridView1'),this,event);"&lt;/span&gt;
                        runat=&lt;span class="str"&gt;"server"&lt;/span&gt; /&amp;gt;
                &amp;lt;/ItemTemplate&amp;gt;
            &amp;lt;/asp:TemplateField&amp;gt;
        &amp;lt;/Columns&amp;gt;
    &amp;lt;/asp:GridView&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
on code Behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="csharpcode-wrapper" id="codeSnippetWrapper"&gt;
&lt;br /&gt;
&lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Page_Load(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
   {
       &lt;span class="kwrd"&gt;if&lt;/span&gt; (!IsPostBack)
       {
           DataTable dt = &lt;span class="kwrd"&gt;new&lt;/span&gt; DataTable();
           dt.Columns.Add(&lt;span class="str"&gt;"ID"&lt;/span&gt;);
           dt.Columns.Add(&lt;span class="str"&gt;"Name"&lt;/span&gt;);
           DataRow dr;
           &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 1; i &amp;lt; 130; i++)
           {
               dr = dt.NewRow();
               dr[&lt;span class="str"&gt;"ID"&lt;/span&gt;] = i;
               dr[&lt;span class="str"&gt;"Name"&lt;/span&gt;] = &lt;span class="str"&gt;"Record No"&lt;/span&gt; + i.ToString();
               dt.Rows.Add(dr);
           }
           GridView1.DataSource = dt;
           GridView1.DataBind();
       }
   }&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Javascript&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="csharpcode-wrapper" id="codeSnippetWrapper"&gt;
&lt;br /&gt;
&lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; lst = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
        &lt;span class="kwrd"&gt;function&lt;/span&gt; CheckAllCheckbox(ctrl, sValue, e) {
            &lt;span class="kwrd"&gt;var&lt;/span&gt; chkName = sValue.id;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; arlstr = sValue.id.split(ctrl.id);
            &lt;span class="kwrd"&gt;var&lt;/span&gt; id = arlstr[1].split(&lt;span class="str"&gt;'_'&lt;/span&gt;)[1].substring(3);

            &lt;span class="kwrd"&gt;var&lt;/span&gt; ee = (window.&lt;span class="kwrd"&gt;event&lt;/span&gt;) ? &lt;span class="kwrd"&gt;event&lt;/span&gt; : e;
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (ee.shiftKey) {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (lst != &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                    &lt;span class="kwrd"&gt;var&lt;/span&gt; First = 0, last = 0;
                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (parseInt(lst) &amp;gt; parseInt(id)) {
                        First = parseInt(id);
                        last = parseInt(lst);
                    }
                    &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                        First = parseInt(lst);
                        last = parseInt(id);
                    }

                    &lt;span class="kwrd"&gt;for&lt;/span&gt; (i = First; i &amp;lt; last; i++) {                        
                        &lt;span class="kwrd"&gt;var&lt;/span&gt; p = (i &amp;lt;= 9 ? &lt;span class="str"&gt;'0'&lt;/span&gt; + i : i);
                        &lt;span class="kwrd"&gt;var&lt;/span&gt; ctrlnew = chkName.replace(&lt;span class="str"&gt;'ctl'&lt;/span&gt; + id, &lt;span class="str"&gt;'ctl'&lt;/span&gt; + p);                        
                        document.getElementById(ctrlnew).&lt;span class="kwrd"&gt;checked&lt;/span&gt; = sValue.&lt;span class="kwrd"&gt;checked&lt;/span&gt;;
                    }                    
                }
            }
            lst = id;
        }&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the Source to Download &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://cid-552998535cb9985d.office.live.com/self.aspx/.Public/SelectWithShift.rar" title="http://cid-552998535cb9985d.office.live.com/self.aspx/.Public/SelectWithShift.rar"&gt;http://cid-552998535cb9985d.office.live.com/self.aspx/.Public/SelectWithShift.rar&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-7154778798162920917?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Nl0s2tLstWRucd2GZAjK1Mqfnqk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Nl0s2tLstWRucd2GZAjK1Mqfnqk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Nl0s2tLstWRucd2GZAjK1Mqfnqk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Nl0s2tLstWRucd2GZAjK1Mqfnqk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/zt1j-B4hr70/select-multiple-checkbox-with-shift-key.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_-7eTu68KmOU/TLtWYYDOGsI/AAAAAAAAAdM/F2xSRqP3mzA/s72-c/First%20With%20Shift_thumb.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/10/select-multiple-checkbox-with-shift-key.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-7171851102403313237</guid><pubDate>Fri, 03 Sep 2010 19:58:00 +0000</pubDate><atom:updated>2010-09-04T01:30:15.926+05:30</atom:updated><title>Epic Browser</title><description>&lt;p&gt;&lt;font face="times new roman,times,serif" size="3"&gt;&lt;strong&gt;Background of Epic&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;div class="data"&gt;
  &lt;p style="margin: 20px 10px;"&gt;&lt;font face="times new roman,times,serif" size="3"&gt; The Epic Browser is the first-ever web browser for India and the first product from the software company &lt;a href="http://www.hiddenreflex.com/"&gt;Hidden Reflex.&lt;/a&gt;&lt;/font&gt;
  &lt;/p&gt;
  &lt;p style="margin: 20px 10px;"&gt;&lt;font face="times new roman,times,serif" size="3"&gt;Hidden Reflex is a software product startup founded by Alok Bhardwaj in 2007 and based in Bangalore. Alok, who was raised in the U.S., was inspired by the success of open source software and web 2.0 innovations. Hidden Reflex began as a team of three but soon progressed and now has dedicated teams working on two products simultaneously – the Epic Browser and NewsDrink. The company also has three patents pending related to its product innovations.&lt;/font&gt;
  &lt;/p&gt;
  &lt;p style="margin: 20px 10px;"&gt;&lt;font face="times new roman,times,serif" size="3"&gt;The company’s vision is to become the first globally recognized, consumer-oriented software product company in India. According to Alok Bhardwaj, CEO and Founder of Hidden Reflex, “We want to prove that India can be a hub for innovation in software and technology."&lt;/font&gt;
  &lt;/p&gt;
  &lt;p style="margin: 20px 10px;"&gt;&lt;font face="times new roman,times,serif" size="3"&gt;Our mission with the Epic browser is to create the most secure, most productive and most “Indian” browsing experience of any web browser!&lt;/font&gt;
  &lt;/p&gt;
  &lt;hr width="100%" size="2" /&gt; &lt;font size="3"&gt;
  &lt;br /&gt;&lt;/font&gt;
&lt;/div&gt;&lt;font face="times new roman,times,serif" size="3"&gt;&lt;strong&gt;What Someone might need in a browser..&lt;/strong&gt;&lt;/font&gt;
&lt;ul&gt;
  &lt;li&gt; &lt;font face="times new roman,times,serif" size="3"&gt;help to blog&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;news search&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;store personal data&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;upload data directly from browser that of our Hard Drive&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;multiple language&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;attractive theaming/background&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;faster
  &lt;br /&gt;&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;Various Social Networking sites updates&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;Mails updates&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;Antivirus&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;Online News Channel&lt;/font&gt;&lt;/li&gt;
  &lt;li&gt;&lt;font face="times new roman,times,serif" size="3"&gt;and lot more&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;font face="times new roman,times,serif" size="3"&gt;all this available in a single 9MB application that is &lt;a title="Epic Browser" target="_blank" href="http://www.epicbrowser.com/"&gt;&lt;strong&gt;Epic Browser&lt;/strong&gt;&lt;/a&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;hr width="100%" size="2" /&gt;
&lt;p&gt;&lt;font face="times new roman,times,serif" size="3"&gt;&lt;strong&gt;&amp;nbsp;Interface&lt;/strong&gt;
  &lt;br /&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;&lt;font face="times new roman,times,serif" size="3"&gt;Please refer this page for mindblowing Interface &lt;a title="Epic Interface" href="http://www.epicbrowser.com/press.html"&gt;http://www.epicbrowser.com/press.html&lt;/a&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;hr width="100%" size="2" /&gt;
&lt;p&gt;&lt;font size="3"&gt;Every one must try Once... &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt; &lt;font size="3"&gt;
  &lt;br /&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;&amp;nbsp; &lt;/font&gt;
&lt;/p&gt;&lt;font face="times new roman,times,serif" size="3"&gt;
&lt;br /&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-7171851102403313237?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6yporDlsxS9VQya-IAF0ktwYZ_o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6yporDlsxS9VQya-IAF0ktwYZ_o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6yporDlsxS9VQya-IAF0ktwYZ_o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6yporDlsxS9VQya-IAF0ktwYZ_o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/fkQvDKD31RM/epic-browser.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/09/epic-browser.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-2323766152056214416</guid><pubDate>Sun, 29 Aug 2010 17:12:00 +0000</pubDate><atom:updated>2011-04-06T03:00:15.456+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ViewState</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>Access ViewState From ClassFile</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
teHello Friends&lt;br /&gt;
&lt;br /&gt;
Manytime we need to use ViewState while working 3-tier Architecture but its difficult to use it.&lt;br /&gt;
here i have made a sample to use Viewstate from Classfile&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ViewState:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Viewstate is an object of Class StateBag&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Here is sample of Viewstate in Class file&lt;br /&gt;
in this example we will add names from Textbox to gridview using Viewstate.&lt;br /&gt;
so&lt;br /&gt;
in code behind&lt;br /&gt;
&lt;blockquote&gt;
&amp;lt;div&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
Name :&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;asp:TextBox ID="txtName" runat="server"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;asp:Button ID="btnAdd" runat="server"&lt;/blockquote&gt;
&lt;blockquote&gt;
Text="Add" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;/div&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;div&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;asp:GridView ID="grvNames" runat="server" AutoGenerateColumns="False" &lt;/blockquote&gt;
&lt;blockquote&gt;
CellPadding="4" ForeColor="#333333" GridLines="None"&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;RowStyle BackColor="#F7F6F3" ForeColor="#333333" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;Columns&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;asp:BoundField DataField="ID" HeaderText="No" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;asp:BoundField DataField="SName" HeaderText="Name" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;/Columns&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;EditRowStyle BackColor="#999999" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;AlternatingRowStyle BackColor="White" ForeColor="#284775" /&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;/asp:GridView&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&amp;lt;/div&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
and in aspx.cs file&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
using System;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Collections.Generic;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Linq;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Web;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Web.UI;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Web.UI.WebControls;&lt;/blockquote&gt;
&lt;blockquote&gt;
public partial class _Default : System.Web.UI.Page&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
protected void Page_Load(object sender, EventArgs e)&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
Controller_Default objController = new Controller_Default(this.ViewState);&lt;/blockquote&gt;
&lt;blockquote&gt;
btnAdd.Click += new EventHandler(objController.btnAdd_Click);&lt;/blockquote&gt;
&lt;blockquote&gt;
}    &lt;/blockquote&gt;
&lt;blockquote&gt;
}&lt;/blockquote&gt;
&amp;nbsp;Now Create a Controller file named &lt;b&gt;Controller_Default.cs &lt;/b&gt;in a Folder named&amp;nbsp;&lt;b&gt;Controller&lt;/b&gt;&lt;br /&gt;
The Code in the Controller Class will go like this&lt;br /&gt;
&lt;blockquote&gt;
using System;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Collections.Generic;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Linq;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Web;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Collections;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Data;&lt;/blockquote&gt;
&lt;blockquote&gt;
using System.Web.UI.WebControls;&lt;/blockquote&gt;
&lt;blockquote&gt;
public class Controller_Default&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
#region Variables &amp;amp; contructors&lt;/blockquote&gt;
&lt;blockquote&gt;
IDictionary _ViewState;&lt;/blockquote&gt;
&lt;blockquote&gt;
public Controller_Default()&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;br /&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
}&lt;/blockquote&gt;
&lt;blockquote&gt;
public Controller_Default(IDictionary objStageBag)&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
_ViewState = objStageBag;&lt;/blockquote&gt;
&lt;blockquote&gt;
}&lt;/blockquote&gt;
&lt;blockquote&gt;
#endregion&lt;/blockquote&gt;
&lt;blockquote&gt;
#region Events&lt;/blockquote&gt;
&lt;blockquote&gt;
/// &amp;lt;summary&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
/// Button Event to Add Name &lt;/blockquote&gt;
&lt;blockquote&gt;
/// &amp;lt;/summary&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
/// &amp;lt;param name="sender"&amp;gt;&amp;lt;/param&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
/// &amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
public void btnAdd_Click(object sender, EventArgs e)&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
Button btn = (Button)sender;&lt;/blockquote&gt;
&lt;blockquote&gt;
try&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
DataTable dt = new DataTable();&lt;/blockquote&gt;
&lt;blockquote&gt;
ViewStateClass objViewState = new ViewStateClass(_ViewState);&lt;/blockquote&gt;
&lt;blockquote&gt;
if (objViewState.GetViewStateTable("TblNames") != null)&lt;/blockquote&gt;
&lt;blockquote&gt;
dt = objViewState.GetViewStateTable("TblNames");&lt;/blockquote&gt;
&lt;blockquote&gt;
else&lt;/blockquote&gt;
&lt;blockquote&gt;
dt = CreateNewTable();&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;br /&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
DataRow dr = dt.NewRow();&lt;/blockquote&gt;
&lt;blockquote&gt;
dr["ID"] = dt.Rows.Count + 1;&lt;/blockquote&gt;
&lt;blockquote&gt;
dr["SName"] = ((TextBox)btn.Parent.FindControl("txtName")).Text.ToString();&lt;/blockquote&gt;
&lt;blockquote&gt;
dt.Rows.Add(dr);&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;br /&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
objViewState.SetViewState("TblNames", dt);&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;br /&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
GridView grv = (GridView)btn.Parent.FindControl("grvNames");&lt;/blockquote&gt;
&lt;blockquote&gt;
grv.DataSource = dt;&lt;/blockquote&gt;
&lt;blockquote&gt;
grv.DataBind();&lt;/blockquote&gt;
&lt;blockquote&gt;
((TextBox)btn.Parent.FindControl("txtName")).Text = string.Empty;&lt;/blockquote&gt;
&lt;blockquote&gt;
((TextBox)btn.Parent.FindControl("txtName")).Focus();&lt;/blockquote&gt;
&lt;blockquote&gt;
}&lt;/blockquote&gt;
&lt;blockquote&gt;
catch (Exception Ex)&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;br /&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
}&lt;/blockquote&gt;
&lt;blockquote&gt;
}&lt;/blockquote&gt;
&lt;blockquote&gt;
#endregion&lt;/blockquote&gt;
&lt;blockquote&gt;
#region Methods&lt;/blockquote&gt;
&lt;blockquote&gt;
/// &amp;lt;summary&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
/// Method to Create New Table&lt;/blockquote&gt;
&lt;blockquote&gt;
/// &amp;lt;/summary&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
private DataTable CreateNewTable()&lt;/blockquote&gt;
&lt;blockquote&gt;
{&lt;/blockquote&gt;
&lt;blockquote&gt;
DataTable dt = new DataTable();&lt;/blockquote&gt;
&lt;blockquote&gt;
dt.Columns.Add("ID");&lt;/blockquote&gt;
&lt;blockquote&gt;
dt.Columns.Add("SName");&lt;/blockquote&gt;
&lt;blockquote&gt;
return dt;&lt;/blockquote&gt;
&lt;blockquote&gt;
}&lt;/blockquote&gt;
&lt;blockquote&gt;
#endregion&lt;/blockquote&gt;
&lt;blockquote&gt;
}&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;br /&gt;
in this code we have created&lt;b&gt; &lt;/b&gt;and object Named &lt;b&gt;objViewState&lt;/b&gt; of class &lt;b&gt;ViewStateClass.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The Syntex&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;objViewState.GetViewStateTable("TblNames") &lt;/b&gt;is used to get DataTable from ViewState&lt;br /&gt;
Same way &amp;nbsp;&lt;b&gt;objViewState.SetViewState("TblNames", dt); &lt;/b&gt;Saves the DataTable in ViewState.&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;Now here is the class&amp;nbsp;&lt;b&gt;ViewStateClass , you can download it from &lt;a href="http://cid-552998535cb9985d.office.live.com/self.aspx/.Public/ViewStateClass.cs"&gt;&lt;span style="color: blue;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;in this class we have many methods to save different types like &lt;b&gt;String,Int, Array and so on ... you can create same whichever you require.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;you can download the source from &lt;a href="http://cid-552998535cb9985d.office.live.com/self.aspx/.Public/Viewstate.rar"&gt;&lt;span style="color: blue;"&gt;Here&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;All The Best&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-2323766152056214416?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/poCpBt7nLoJqRcwfS4Z6QCJJeFg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/poCpBt7nLoJqRcwfS4Z6QCJJeFg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/poCpBt7nLoJqRcwfS4Z6QCJJeFg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/poCpBt7nLoJqRcwfS4Z6QCJJeFg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/BXkk1fji_ms/access-viewstate-from-classfile.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/08/access-viewstate-from-classfile.html</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/blogspot/WJWG/~5/BXkk1fji_ms/access-viewstate-from-classfile.html" length="0" type="text/html" /><feedburner:origEnclosureLink>http://ransandeep.blogspot.com/2010/08/access-viewstate-from-classfile.html</feedburner:origEnclosureLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-4539444206924256244</guid><pubDate>Thu, 26 Aug 2010 18:08:00 +0000</pubDate><atom:updated>2011-04-06T03:00:49.881+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">T-SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>Get Nth record from Table</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello Friends

Here is a simple query to get nth Record from Table

&lt;br /&gt;
&lt;blockquote&gt;
SELECT @NewPriority=Priority FROM ( 
  SELECT Id,Priority, ROW_NUMBER() OVER (ORDER BY priority) as row FROM Job where IsDeleted=0
    and Id not in (select jobId from Job_Cylinder where IsDeleted=0))  
   a WHERE row=@cnt-(@NewPriority)+1&lt;/blockquote&gt;
There are many ways to get this.. 

All the Best&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-4539444206924256244?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pAigz01twTX2-JGCzCJnzyclwKw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pAigz01twTX2-JGCzCJnzyclwKw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pAigz01twTX2-JGCzCJnzyclwKw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pAigz01twTX2-JGCzCJnzyclwKw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/ZTaNjnK6obs/get-nth-record-from-table.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/08/get-nth-record-from-table.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-3158635742332899762</guid><pubDate>Wed, 14 Apr 2010 18:13:00 +0000</pubDate><atom:updated>2011-04-06T03:01:35.596+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">CSS</category><title>Light-weight Popup using CSS and Javascript..</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;Hello Friends&lt;/b&gt; &lt;br /&gt;
&lt;b&gt;Once Again with a Rocking point&lt;/b&gt; &lt;b&gt;we have seen lots of Popup till now…..&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;all are good at their places&lt;/b&gt; &lt;b&gt;just search on Google “Model Popup” and you will get a long list of examples and javascripts for popup…&lt;/b&gt; &lt;br /&gt;
&lt;b&gt;Ajax Control toolkit Model Popup Extender &lt;/b&gt;&lt;a href="http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ModalPopup/ModalPopup.aspx" title="http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ModalPopup/ModalPopup.aspx"&gt;&lt;b&gt;http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ModalPopup/ModalPopup.aspx&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&lt;b&gt;then few more&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;a href="http://www.modalpopups.com/blog/" title="http://www.modalpopups.com/blog/"&gt;&lt;b&gt;http://www.modalpopups.com/blog/&lt;/b&gt;&lt;/a&gt; &lt;br /&gt;
&lt;a href="http://www.jquery-dev.com/2008/12/02/jqmodal-jquery-modal-popup-plugin" title="http://www.jquery-dev.com/2008/12/02/jqmodal-jquery-modal-popup-plugin"&gt;&lt;b&gt;http://www.jquery-dev.com/2008/12/02/jqmodal-jquery-modal-popup-plugin&lt;/b&gt;&lt;/a&gt; &lt;br /&gt;
&lt;b&gt;one more javascript framework is Dojo &lt;/b&gt;&lt;a href="http://www.dojotoolkit.org/" title="http://www.dojotoolkit.org/"&gt;&lt;b&gt;http://www.dojotoolkit.org/&lt;/b&gt;&lt;/a&gt; &lt;br /&gt;
&lt;b&gt;here i am also one type of popup… but i am sure you will like it&lt;/b&gt; &lt;br /&gt;
&lt;b&gt;because it don’t require any kind of configuration and dependencies…&lt;/b&gt;   &lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: &amp;quot;Consolas&amp;quot;; font-size: x-small;"&gt;&lt;/span&gt;&lt;style type="text/css"&gt;
&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;it is combination of CSS and javascript… with 70:30 ratio….&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;means here CSS is used more and rest is javascript….&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;then also its more power full&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;so from first sight you can determine its light–weight compare to other model popups&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;here i have an example…&lt;/b&gt;&lt;br /&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;input&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="Button1"&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="button"&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;      &lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;="Dispay Message"&lt;/span&gt; &lt;span style="color: red;"&gt;onclick&lt;/span&gt;&lt;span style="color: blue;"&gt;="ShowDiv('DivPopUp')"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;style type="text/css"&gt;
&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Drop the control on which you want to fire ModelPopup.. and assign javascript event to fire onclick="ShowDiv('DivPopUp')" &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;if you are using server control like&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;br /&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:Button&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="Button2"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;&lt;span style="color: blue;"&gt;="Dispay Message"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;style type="text/css"&gt;
&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;then at Server Side code…. &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;in Page_Load Event&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;br /&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; Button2.Attributes.Add(&lt;span style="color: #006080;"&gt;"onclick"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"ShowDiv('DivPopUp')"&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;
&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;now&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Put this block of code anywwhere in you page&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="DivPopUp"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="PopUpDiv"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;        &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="PopUpHeader"&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="DivPopUpHeader"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;            &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="TitleLine"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;                My PopUp&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;            &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;            &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt; &lt;span style="color: red;"&gt;onclick&lt;/span&gt;&lt;span style="color: blue;"&gt;="HideDiv('DivPopUp');"&lt;/span&gt; &lt;span style="color: red;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;="Close"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="CloseButton"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;            &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;        &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;        &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="Divcontent"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;            &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;p&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;                Your Content Goes Here&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;p&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;        &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;    &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;“My PopUp” is&amp;nbsp; the title of&amp;nbsp; Modelpopup and put your content in “DivContent”&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To make this idea sucessfull we have to add few CSS classes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: blue;"&gt;style&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;         &lt;span style="color: #cc6633;"&gt;.PopUpDiv&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;             &lt;span style="color: blue;"&gt;background-color&lt;/span&gt;: &lt;span style="color: #006080;"&gt;White;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;             &lt;span style="color: blue;"&gt;border&lt;/span&gt;: &lt;span style="color: #006080;"&gt;1px solid Black;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;             &lt;span style="color: blue;"&gt;position&lt;/span&gt;: &lt;span style="color: #006080;"&gt;fixed;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;             &lt;span style="color: blue;"&gt;display&lt;/span&gt;: &lt;span style="color: #006080;"&gt;none;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;             &lt;span style="color: blue;"&gt;top&lt;/span&gt;: &lt;span style="color: #006080;"&gt;15%;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;             &lt;span style="color: blue;"&gt;width&lt;/span&gt;: &lt;span style="color: #006080;"&gt;660px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;             &lt;span style="color: blue;"&gt;left&lt;/span&gt;: &lt;span style="color: #006080;"&gt;20%;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;             &lt;span style="color: blue;"&gt;padding&lt;/span&gt;: &lt;span style="color: #006080;"&gt;0px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;             &lt;span style="color: blue;"&gt;height&lt;/span&gt;: &lt;span style="color: #006080;"&gt;450px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;             z-index: 2;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;         &lt;span style="color: #cc6633;"&gt;.PopUpHeader&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;             &lt;span style="color: blue;"&gt;font-size&lt;/span&gt;: &lt;span style="color: #006080;"&gt;small;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;             &lt;span style="color: blue;"&gt;font-weight&lt;/span&gt;: &lt;span style="color: #006080;"&gt;bolder;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;             &lt;span style="color: blue;"&gt;height&lt;/span&gt;: &lt;span style="color: #006080;"&gt;45px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;             &lt;span style="color: blue;"&gt;position&lt;/span&gt;: &lt;span style="color: #006080;"&gt;relative;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;             &lt;span style="color: blue;"&gt;background&lt;/span&gt;: url(bg&lt;span style="color: #cc6633;"&gt;.gif&lt;/span&gt;) repeat&lt;span style="color: #006080;"&gt;-x;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;             &lt;span style="color: blue;"&gt;top&lt;/span&gt;: &lt;span style="color: #006080;"&gt;0px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;         &lt;span style="color: #cc6633;"&gt;.CloseButton&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt;             &lt;span style="color: blue;"&gt;background&lt;/span&gt;: url(close&lt;span style="color: #cc6633;"&gt;.png&lt;/span&gt;) no&lt;span style="color: #006080;"&gt;-repeat;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt;             &lt;span style="color: blue;"&gt;float&lt;/span&gt;: &lt;span style="color: #006080;"&gt;right;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;             &lt;span style="color: blue;"&gt;cursor&lt;/span&gt;: &lt;span style="color: #006080;"&gt;pointer;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;             &lt;span style="color: blue;"&gt;width&lt;/span&gt;: &lt;span style="color: #006080;"&gt;35px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt;             &lt;span style="color: blue;"&gt;height&lt;/span&gt;: &lt;span style="color: #006080;"&gt;35px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt;  31:&lt;/span&gt;             &lt;span style="color: blue;"&gt;right&lt;/span&gt;: &lt;span style="color: #006080;"&gt;-15px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt;  32:&lt;/span&gt;             &lt;span style="color: blue;"&gt;top&lt;/span&gt;: &lt;span style="color: #006080;"&gt;-15px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt;  33:&lt;/span&gt;             &lt;span style="color: blue;"&gt;position&lt;/span&gt;: &lt;span style="color: #006080;"&gt;absolute;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt;  34:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt;  35:&lt;/span&gt;         &lt;span style="color: #cc6633;"&gt;.TitleLine&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum36" style="color: #606060;"&gt;  36:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum37" style="color: #606060;"&gt;  37:&lt;/span&gt;             &lt;span style="color: blue;"&gt;text-align&lt;/span&gt;: &lt;span style="color: #006080;"&gt;center;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum38" style="color: #606060;"&gt;  38:&lt;/span&gt;             &lt;span style="color: blue;"&gt;float&lt;/span&gt;: &lt;span style="color: #006080;"&gt;left;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum39" style="color: #606060;"&gt;  39:&lt;/span&gt;             &lt;span style="color: blue;"&gt;width&lt;/span&gt;: &lt;span style="color: #006080;"&gt;90%;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum40" style="color: #606060;"&gt;  40:&lt;/span&gt;             &lt;span style="color: blue;"&gt;color&lt;/span&gt;: &lt;span style="color: #006080;"&gt;Silver;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum41" style="color: #606060;"&gt;  41:&lt;/span&gt;             &lt;span style="color: blue;"&gt;line-height&lt;/span&gt;: &lt;span style="color: #006080;"&gt;25px;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum42" style="color: #606060;"&gt;  42:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum43" style="color: #606060;"&gt;  43:&lt;/span&gt;         &lt;span style="color: #cc6633;"&gt;.LayerDiv&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum44" style="color: #606060;"&gt;  44:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum45" style="color: #606060;"&gt;  45:&lt;/span&gt;             &lt;span style="color: blue;"&gt;height&lt;/span&gt;: &lt;span style="color: #006080;"&gt;100%;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum46" style="color: #606060;"&gt;  46:&lt;/span&gt;             &lt;span style="color: blue;"&gt;background-color&lt;/span&gt;: &lt;span style="color: #006080;"&gt;#030303;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum47" style="color: #606060;"&gt;  47:&lt;/span&gt;             filter: alpha(opacity=60);&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum48" style="color: #606060;"&gt;  48:&lt;/span&gt;             opacity: &lt;span style="color: #006080;"&gt;0.6;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum49" style="color: #606060;"&gt;  49:&lt;/span&gt;             &lt;span style="color: blue;"&gt;border&lt;/span&gt;: &lt;span style="color: #006080;"&gt;1px solid black;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum50" style="color: #606060;"&gt;  50:&lt;/span&gt;             &lt;span style="color: blue;"&gt;position&lt;/span&gt;: &lt;span style="color: #006080;"&gt;fixed;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum51" style="color: #606060;"&gt;  51:&lt;/span&gt;             &lt;span style="color: blue;"&gt;left&lt;/span&gt;: 0;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum52" style="color: #606060;"&gt;  52:&lt;/span&gt;             &lt;span style="color: blue;"&gt;top&lt;/span&gt;: 0;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum53" style="color: #606060;"&gt;  53:&lt;/span&gt;             &lt;span style="color: blue;"&gt;width&lt;/span&gt;: &lt;span style="color: #006080;"&gt;0%;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum54" style="color: #606060;"&gt;  54:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum55" style="color: #606060;"&gt;  55:&lt;/span&gt;     &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: blue;"&gt;style&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;and few Javascript&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;         &lt;span style="color: blue;"&gt;function&lt;/span&gt; HideDiv(DivPopUp) {&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;             &lt;span style="color: blue;"&gt;var&lt;/span&gt; DivPopUp = document.getElementById(DivPopUp);&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;             &lt;span style="color: blue;"&gt;var&lt;/span&gt; DivLayer = document.getElementById(&lt;span style="color: #006080;"&gt;'DivLayer'&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;             DivPopUp.style.display = &lt;span style="color: #006080;"&gt;"none"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;             DivLayer.style.width = &lt;span style="color: #006080;"&gt;"0%"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;         &lt;span style="color: blue;"&gt;function&lt;/span&gt; ShowDiv(DivPopUp) {&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;             &lt;span style="color: blue;"&gt;var&lt;/span&gt; DivPopUp = document.getElementById(DivPopUp);&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;             &lt;span style="color: blue;"&gt;var&lt;/span&gt; DivLayer = document.getElementById(&lt;span style="color: #006080;"&gt;'DivLayer'&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;             DivPopUp.style.display = &lt;span style="color: #006080;"&gt;"block"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;             DivLayer.style.width = &lt;span style="color: #006080;"&gt;"100%"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;         }        &lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;     &amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/_-7eTu68KmOU/S83wTBhwnGI/AAAAAAAAAcg/hBAvhG2IOZE/s1600-h/bg2.gif"&gt;&lt;img alt="bg" border="0" height="29" src="http://lh3.ggpht.com/_-7eTu68KmOU/S83wT91qK2I/AAAAAAAAAck/NArVxN2G-50/bg_thumb.gif?imgmax=800" style="border-width: 0px; display: inline;" title="bg" width="5" /&gt;&lt;/a&gt; &lt;a href="http://lh4.ggpht.com/_-7eTu68KmOU/S83wUcUVxyI/AAAAAAAAAco/lLzEROWYT6g/s1600-h/close2.png"&gt;&lt;img alt="close" border="0" height="39" src="http://lh6.ggpht.com/_-7eTu68KmOU/S83wVASsxPI/AAAAAAAAAcs/42muf-0sANo/close_thumb.png?imgmax=800" style="border-width: 0px; display: inline;" title="close" width="39" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;here are two images which will help us to give quite descent look&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;we can also modify as per our requirement&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:77eb0837-153d-4fce-86d6-60aa80d8f4ba" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;
LiveJournal Tags: &lt;a href="http://www.livejournal.com/interests.bml?int=JavaScript" rel="tag"&gt;JavaScript&lt;/a&gt;,&lt;a href="http://www.livejournal.com/interests.bml?int=css" rel="tag"&gt;css&lt;/a&gt;,&lt;a href="http://www.livejournal.com/interests.bml?int=jquery" rel="tag"&gt;jquery&lt;/a&gt;,&lt;a href="http://www.livejournal.com/interests.bml?int=Ajax+Toolkit" rel="tag"&gt;Ajax Toolkit&lt;/a&gt;,&lt;a href="http://www.livejournal.com/interests.bml?int=Model+Popup" rel="tag"&gt;Model Popup&lt;/a&gt;,&lt;a href="http://www.livejournal.com/interests.bml?int=Div" rel="tag"&gt;Div&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Click to Download &amp;nbsp;the Source &lt;a href="http://cid-552998535cb9985d.office.live.com/self.aspx/.Public/Popup.zip"&gt;Here&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.codeproject.com/script/Membership/View.aspx?mid=3534012" rel="tag"&gt;CodeProject&lt;/a&gt;
All The best… Hope you like this….&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-3158635742332899762?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wHItcIBwNOETn97Hm_bVdzCXyiM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wHItcIBwNOETn97Hm_bVdzCXyiM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wHItcIBwNOETn97Hm_bVdzCXyiM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wHItcIBwNOETn97Hm_bVdzCXyiM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/C29A9sX3IWU/light-weight-popup-using-css-and.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_-7eTu68KmOU/S83wT91qK2I/AAAAAAAAAck/NArVxN2G-50/s72-c/bg_thumb.gif?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/04/light-weight-popup-using-css-and.html</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/blogspot/WJWG/~5/C29A9sX3IWU/light-weight-popup-using-css-and.html" length="0" type="text/html" /><feedburner:origEnclosureLink>http://ransandeep.blogspot.com/2010/04/light-weight-popup-using-css-and.html</feedburner:origEnclosureLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-7287269830161876656</guid><pubDate>Sat, 06 Mar 2010 21:09:00 +0000</pubDate><atom:updated>2011-04-06T03:01:55.156+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>DataBase Specific Queries</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Hello friends&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;Here are few Database Specific Queries&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Select All Database list&lt;/b&gt;&amp;nbsp; &lt;/li&gt;
&lt;/ul&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;1:&lt;/span&gt; &lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; [name] &lt;span style="color: blue;"&gt;FROM&lt;/span&gt; sys.databases&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;2:&lt;/span&gt; &lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; [name] &lt;span style="color: blue;"&gt;FROM&lt;/span&gt; sys.sysdatabases&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;b&gt;This will Result&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_-7eTu68KmOU/S5LKutrqGkI/AAAAAAAAAbg/ZrVmLM4xjPY/s1600-h/Database.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" tooltip="Select All Database list"&gt;&lt;img alt="Select All Database list" border="0" src="http://1.bp.blogspot.com/_-7eTu68KmOU/S5LKutrqGkI/AAAAAAAAAbg/ZrVmLM4xjPY/s320/Database.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Select All Tables of particular Database.&lt;/b&gt;&amp;nbsp; &lt;/li&gt;
&lt;/ul&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;1:&lt;/span&gt; &lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; Name, type,type_desc &lt;span style="color: blue;"&gt;FROM&lt;/span&gt; sys.objects &lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;2:&lt;/span&gt; &lt;span style="color: blue;"&gt;where&lt;/span&gt; Type=&lt;span style="color: #006080;"&gt;'u'&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;b&gt;This will Result&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/_-7eTu68KmOU/S5LK7yq0XrI/AAAAAAAAAbo/kLNaNG0dbkE/s1600-h/Tables.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Select All Tables of particular Database" border="0" src="http://4.bp.blogspot.com/_-7eTu68KmOU/S5LK7yq0XrI/AAAAAAAAAbo/kLNaNG0dbkE/s320/Tables.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Here Fields Type and Type_Desc are&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table border="1" cellpadding="2" cellspacing="1" style="font-weight: bold;"&gt;
        &lt;tbody&gt;
&lt;tr&gt;
            &lt;td align="center" style="background-color: black; color: white;" valign="top" width="60"&gt;Type
            &lt;/td&gt;
            &lt;td align="center" style="background-color: black; color: white;" valign="top" width="286"&gt;Type_Desc
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="57"&gt;C
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="289"&gt;CHECK_CONSTRAINT
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="54"&gt;D
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="291"&gt;DEFAULT_CONSTRAINT
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="53"&gt;F
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="292"&gt;FOREIGN_KEY_CONSTRAINT
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="52"&gt;FN
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;SQL_SCALAR_FUNCTION
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="52"&gt;IF
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;SQL_INLINE_TABLE_VALUED_FUNCTION
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="52"&gt;IT
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;INTERNAL_TABLE
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="52"&gt;P
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;SQL_STORED_PROCEDURE
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="52"&gt;PK
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;PRIMARY_KEY_CONSTRAINT
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="52"&gt;S
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;SYSTEM_TABLE
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="52"&gt;SQ
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;SERVICE_QUEUE
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="102"&gt;TF
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;SQL_TABLE_VALUED_FUNCTION
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="102"&gt;TR
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;SQL_TRIGGER
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="102"&gt;U
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;USER_TABLE
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="102"&gt;UQ
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;UNIQUE_CONSTRAINT
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
            &lt;td align="center" valign="top" width="102"&gt;V
            &lt;/td&gt;
            &lt;td align="center" valign="top" width="293"&gt;VIEW
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;can be more than this… &lt;/b&gt;
    &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Select Columns from particular Table&lt;/b&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;1:&lt;/span&gt; &lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; column_name &lt;span style="color: blue;"&gt;as&lt;/span&gt; [&lt;span style="color: blue;"&gt;Column&lt;/span&gt; Name],data_type &lt;span style="color: blue;"&gt;as&lt;/span&gt; [&lt;span style="color: blue;"&gt;Data&lt;/span&gt; Type],Character_maximum_length &lt;span style="color: blue;"&gt;as&lt;/span&gt; [&lt;span style="color: blue;"&gt;Character&lt;/span&gt; Maximum Length]&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;2:&lt;/span&gt; &lt;span style="color: blue;"&gt;FROM&lt;/span&gt; information_schema.columns&lt;/pre&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: courier new,courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;3:&lt;/span&gt; &lt;span style="color: blue;"&gt;WHERE&lt;/span&gt; table_name = &lt;span style="color: #006080;"&gt;'table_1'&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;b&gt;This will Result&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_-7eTu68KmOU/S5LLJUTTANI/AAAAAAAAAbw/x3lU3ARNS5g/s1600-h/Fields.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Select Columns from particular Table" border="0" src="http://1.bp.blogspot.com/_-7eTu68KmOU/S5LLJUTTANI/AAAAAAAAAbw/x3lU3ARNS5g/s320/Fields.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;All The Best&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-7287269830161876656?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4m-iFBm-j72vTFAS_iNWiHdAGfc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4m-iFBm-j72vTFAS_iNWiHdAGfc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4m-iFBm-j72vTFAS_iNWiHdAGfc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4m-iFBm-j72vTFAS_iNWiHdAGfc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/kRlGAOsQ3rY/database-specific-queries.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_-7eTu68KmOU/S5LKutrqGkI/AAAAAAAAAbg/ZrVmLM4xjPY/s72-c/Database.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/03/database-specific-queries.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-6956311499603536092</guid><pubDate>Fri, 05 Mar 2010 16:54:00 +0000</pubDate><atom:updated>2011-04-06T03:08:10.440+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>RemoteDataPass- pass data from one page to Remote Page</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;As i Committed in my previous &lt;/b&gt;&lt;a href="http://ransandeep.blogspot.com/2010/02/iscrosspagepostbackpass-data-from-one.html" target="_blank"&gt;&lt;b&gt;post&lt;/b&gt;&lt;/a&gt;&lt;b&gt;, that i will post code for ReportDataPass.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;it is Quite difficult to pass Data from one Application to another application, &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;because here &lt;/b&gt;&lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;ved=0CAgQFjAA&amp;amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHTTP_cookie&amp;amp;ei=siSIS8iaLIbCrAex1JGSCg&amp;amp;usg=AFQjCNEDosnBFstgBQcesPusS6s6LT9t2g&amp;amp;sig2=B9UHcnb83S4ER-FDhgSIWQ" target="_blank"&gt;&lt;b&gt;Cookie&lt;/b&gt;&lt;/a&gt;&lt;b&gt;, Session variable will not help. &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;now a very simple way it &lt;/b&gt;&lt;a href="http://www.w3schools.com/ASP/coll_querystring.asp" target="_blank"&gt;&lt;b&gt;Query string&lt;/b&gt;&lt;/a&gt;&lt;b&gt;,&amp;nbsp; But as our previous condition, we don’t want to use &lt;/b&gt;&lt;a href="http://www.w3schools.com/ASP/coll_querystring.asp" target="_blank"&gt;&lt;b&gt;Query string&lt;/b&gt;&lt;/a&gt;&lt;b&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;so the last way..&lt;/b&gt;&lt;br /&gt;
&lt;u&gt;&lt;span style="color: #800040; font-size: medium;"&gt;&lt;b&gt;Post Method&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;b&gt;as we know, in any server side scripting languages, like asp, jsp, PHP.. on submit button, the Data is posted to another page or to itself.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;and using&lt;span style="color: maroon;"&gt; Request[“Filedname”] &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;we can have its Value. the same logic we are going to apply..&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;but as we are using VS, where we have facilities of Masterpages and Content page,so when we are using any ContentPage, in that case we can not have form and its Post method.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So we are going to make a dynamic Html Page, and&amp;nbsp; using dynamic Javascript we will post Data to another page.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So create a Class like this&lt;/b&gt;&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; RemoteDataPass&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: blue;"&gt;private&lt;/span&gt; System.Collections.Specialized.NameValueCollection Inputs = &lt;span style="color: blue;"&gt;new&lt;/span&gt; System.Collections.Specialized.NameValueCollection();&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; PostUrl = &lt;span style="color: #006080;"&gt;""&lt;/span&gt;;&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Add(&lt;span style="color: blue;"&gt;string&lt;/span&gt; FieldName, &lt;span style="color: blue;"&gt;string&lt;/span&gt; Fieldvalue)&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     {&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;         Inputs.Add(FieldName, Fieldvalue);&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;     }&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;     &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Post()&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;     {&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;         System.Web.HttpContext.Current.Response.Clear();&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;         System.Web.HttpContext.Current.Response.Write(&lt;span style="color: #006080;"&gt;"&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body onload=\"document.form1.submit()\"&amp;gt;"&lt;/span&gt;);&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;         System.Web.HttpContext.Current.Response.Write(&lt;span style="color: blue;"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #006080;"&gt;"&amp;lt;form name=\"form1\" method=\"post\" action=\"{0}\" &amp;gt;"&lt;/span&gt;, PostUrl));&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;         &lt;span style="color: blue;"&gt;for&lt;/span&gt; (&lt;span style="color: blue;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; Inputs.Keys.Count; i++)&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;         {&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;             System.Web.HttpContext.Current.Response.Write(&lt;span style="color: blue;"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #006080;"&gt;"&amp;lt;input name=\"{0}\" type=\"hidden\" value=\"{1}\"&amp;gt;"&lt;/span&gt;, Inputs.Keys[i], Inputs[Inputs.Keys[i]]));&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;         }&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;         System.Web.HttpContext.Current.Response.Write(&lt;span style="color: #006080;"&gt;"&amp;lt;/form&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;"&lt;/span&gt;);        &lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;         System.Web.HttpContext.Current.Response.End();&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;     }&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt; }&lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;now to post Data from our Source Page.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;br /&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; RemoteDataPass RemotePost = &lt;span style="color: blue;"&gt;new&lt;/span&gt; RemoteDataPass();&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;         RemotePost.PostUrl = &lt;span style="color: #006080;"&gt;"http://ransandeep.blogspot.com/test.aspx"&lt;/span&gt;;&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;         RemotePost.Add(&lt;span style="color: #006080;"&gt;"FirstField"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"Sandeep"&lt;/span&gt;);        &lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;         RemotePost.Post(); &lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;now at Receiving page&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;br /&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: blue;"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;    {&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;         &lt;span style="color: blue;"&gt;if&lt;/span&gt; (Request.Form[ &lt;span style="color: #006080;"&gt;"FirstField"&lt;/span&gt; ] != &lt;span style="color: blue;"&gt;null&lt;/span&gt;  )&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;         {&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;            Response.Write( &lt;span style="color: #006080;"&gt;"FirstField : "&lt;/span&gt;  + Request.Form[ &lt;span style="color: #006080;"&gt;"FirstField"&lt;/span&gt; ] +  &lt;span style="color: #006080;"&gt;"&amp;lt;/br&amp;gt;"&lt;/span&gt; ) ;&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;         }         &lt;/b&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;b&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;    }&lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So this is Simple after getting know….&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;All the best..&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-6956311499603536092?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RW8nxYX78OSKu9FOJ6TxSvNUS5k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RW8nxYX78OSKu9FOJ6TxSvNUS5k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RW8nxYX78OSKu9FOJ6TxSvNUS5k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RW8nxYX78OSKu9FOJ6TxSvNUS5k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/maNdl6v0TpM/remotedatapass-pass-data-from-one-page.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/03/remotedatapass-pass-data-from-one-page.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-2132097543756317672</guid><pubDate>Fri, 05 Mar 2010 16:19:00 +0000</pubDate><atom:updated>2011-04-06T03:08:34.422+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>Popup new Window by Javascript</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;A very Common trick&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Open a new window as Popup by javascript…&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Clicking on any Server Button&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:Button&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="Button1"&lt;/span&gt; &lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;                 &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;                 &lt;span style="color: red;"&gt;OnClientClick&lt;/span&gt;&lt;span style="color: blue;"&gt;="window.open('Page2.aspx',null,'height=200,width=400&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;                         ,status=yes,toolbar=no,menubar=no,location=no,scroll=no');&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;                         return false;"&lt;/pre&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;                 &lt;span style="color: red;"&gt;Text&lt;/span&gt;&lt;span style="color: blue;"&gt;="Button"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;All The Best..&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-2132097543756317672?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VeHNspeXunK6NJ5cmHsMubKTlds/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VeHNspeXunK6NJ5cmHsMubKTlds/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VeHNspeXunK6NJ5cmHsMubKTlds/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VeHNspeXunK6NJ5cmHsMubKTlds/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/Y7HT51vVUYs/popup-new-window-by-javascript.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/03/popup-new-window-by-javascript.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-1915524221183826239</guid><pubDate>Fri, 26 Feb 2010 20:11:00 +0000</pubDate><atom:updated>2011-04-06T03:08:52.067+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>IsCrossPagePostback–pass data from one page to another</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;Hello friends&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;again with new concept..&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Page.IsCrossPagePostBack&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;in many case we are supposed to pass data from one page to another page.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;So we can pass data through &lt;/b&gt;&lt;a href="http://www.w3schools.com/ASP/coll_querystring.asp" target="_blank"&gt;&lt;b&gt;Querystring&lt;/b&gt;&lt;/a&gt;&lt;b&gt;, &lt;/b&gt;&lt;a href="http://www.w3schools.com/asp/asp_ref_session.asp" rel="tag" target="_blank"&gt;&lt;b&gt;Session variables&lt;/b&gt;&lt;/a&gt;&lt;b&gt;, &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;this options are quiet helpful when Data is less in quantity.. but now what if we want whole page to another page… ?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;and in previous page Data is in very big amount around 20 – 40 fields…&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;so it is not feasible to pass that data in querystring or storing all data in session.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;there also another ways, like &lt;/b&gt;&lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;ved=0CAgQFjAA&amp;amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHTTP_cookie&amp;amp;ei=siSIS8iaLIbCrAex1JGSCg&amp;amp;usg=AFQjCNEDosnBFstgBQcesPusS6s6LT9t2g&amp;amp;sig2=B9UHcnb83S4ER-FDhgSIWQ" target="_blank"&gt;&lt;b&gt;Cookie&lt;/b&gt;&lt;/a&gt;&lt;b&gt; or &lt;/b&gt;&lt;a href="http://www.asp.net/learn/aspnet-4-quick-hit-videos/video-8917.aspx" target="_blank"&gt;&lt;b&gt;hiddenfields&lt;/b&gt;&lt;/a&gt;&lt;b&gt; using Post method.. but &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;all this require more trouble..&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;but what if we get previous page controls like it is “on same page”&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;for that we have a good option called &lt;/b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.iscrosspagepostback.aspx" target="_blank"&gt;&lt;b&gt;IsCrossPagePostback&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&amp;nbsp; &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;it is same like our &lt;/b&gt;&lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;ved=0CAYQFjAA&amp;amp;url=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fsystem.web.ui.page.ispostback.aspx&amp;amp;ei=ISWIS-T7GtG3rAeomYGzCg&amp;amp;usg=AFQjCNGAiaaCkfLAq0fgFtAPr0ZRuAy5nQ&amp;amp;sig2=XdU3aBHzZHRWyoUgvqIXbw" target="_blank"&gt;&lt;b&gt;Page.IsPostBack&lt;/b&gt;&lt;/a&gt;&lt;b&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Page.IsPostBack treats only for current page’s postback&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;but to track weather postback is from Current page or previous page we can use IsCrossPagePostBack.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: silver;"&gt;&lt;b&gt;One Important Note : Respose. Redirect will not help us to track IsCrossPagePostBack&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: silver;"&gt;&lt;b&gt;for that we must have Server.Transfer or PostbackURL of Button control&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;So here we have a sample of IsCrossPagePostBack&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;in First.aspx&lt;/b&gt;&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; height: 293px; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="background-color: yellow;"&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="First.aspx.cs" Inherits="First" %&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: maroon;"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: red;"&gt;html&lt;/span&gt; &lt;span style="color: red;"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: blue;"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span style="color: blue;"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;html&lt;/span&gt; &lt;span style="color: red;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://www.w3.org/1999/xhtml"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;head&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;First Page&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;head&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;body&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="form1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;         &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:Label&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="label1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;&lt;span style="color: blue;"&gt;="This is First Page"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:Label&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;         &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:TextBox&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="TextBox1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:TextBox&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;         &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:Button&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="Button1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;&lt;span style="color: blue;"&gt;="Pass To Second Page"&lt;/span&gt; &lt;span style="color: red;"&gt;PostBackUrl&lt;/span&gt;&lt;span style="color: blue;"&gt;="~/Second.aspx"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;body&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;html&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Now in Second.aspx&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; height: 280px; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;br /&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="background-color: yellow;"&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Second.aspx.cs" Inherits="Second" %&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; &lt;span style="background-color: yellow;"&gt;&amp;lt;%@ PreviousPageType VirtualPath="~/First.aspx" %&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: maroon;"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: red;"&gt;html&lt;/span&gt; &lt;span style="color: red;"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: blue;"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span style="color: blue;"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;html&lt;/span&gt; &lt;span style="color: red;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://www.w3.org/1999/xhtml"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;head&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Second Page&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;head&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;body&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="form1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;         &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:Label&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="Label1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;asp:Label&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;     &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;body&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;html&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;in this page very important line is&amp;nbsp; &lt;span style="color: silver;"&gt;line no 3&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;here the Reference is set to inherit controls of Previous page&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; height: 350px; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;br /&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;partial&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; Second : System.Web.UI.Page&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: blue;"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;         &lt;span style="color: blue;"&gt;if&lt;/span&gt; (PreviousPage != &lt;span style="color: blue;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; PreviousPage.IsCrossPagePostBack)&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;             TextBox text = PreviousPage.FindControl(&lt;span style="color: #006080;"&gt;"TextBox1"&lt;/span&gt;) &lt;span style="color: blue;"&gt;as&lt;/span&gt; TextBox;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;             &lt;span style="color: blue;"&gt;if&lt;/span&gt; (text != &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;             {&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;                 Label1.Text = &lt;span style="color: #006080;"&gt;" This is from From First Page : "&lt;/span&gt; + text.Text;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;             }&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;             &lt;span style="color: blue;"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;             {&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;                 Label1.Text = &lt;span style="color: #006080;"&gt;"Empty !!!!"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;             }&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;     }&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt; }&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;in page load it is very easy to fetch data of previous page..&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;so this is very simple if the pages are within same project..&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;we will see very soon when page is in another project means RemotecrossPage&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;All The Best&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-1915524221183826239?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JEOB8I9QCtDEyX41WbxNIftisKQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JEOB8I9QCtDEyX41WbxNIftisKQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JEOB8I9QCtDEyX41WbxNIftisKQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JEOB8I9QCtDEyX41WbxNIftisKQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/_mV6b54qdQ8/iscrosspagepostbackpass-data-from-one.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/02/iscrosspagepostbackpass-data-from-one.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1113941468315876880.post-2665016189677913080</guid><pubDate>Wed, 24 Feb 2010 20:13:00 +0000</pubDate><atom:updated>2011-04-06T03:07:49.531+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">T-SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>Query for Recursive Data</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hi friends..&lt;br /&gt;
&lt;br /&gt;
here is the query for Data kind of Recursive.&lt;br /&gt;
For Example…. &lt;br /&gt;
for a particular thread in forum, its Comments&lt;br /&gt;
so in this case… &lt;br /&gt;
The Data structure will be like this&lt;br /&gt;
&lt;b&gt;Table_3&lt;/b&gt;&lt;br /&gt;
&lt;table border="5" cellpadding="2" cellspacing="0" style="background-color: white; width: 227px;"&gt;&lt;tbody&gt;
&lt;tr&gt;       &lt;td valign="top" width="100"&gt;Id&lt;/td&gt;        &lt;td valign="top" width="125"&gt;int&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign="top" width="100"&gt;ThreadText&lt;/td&gt;        &lt;td valign="top" width="125"&gt;nvarchar(MAX)&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign="top" width="100"&gt;PostedBy&lt;/td&gt;        &lt;td valign="top" width="125"&gt;int&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign="top" width="100"&gt;PostedOn&lt;/td&gt;        &lt;td valign="top" width="125"&gt;DateTime&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign="top" width="100"&gt;ParentId&lt;/td&gt;        &lt;td valign="top" width="125"&gt;int&lt;/td&gt;     &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Now if we want to have the hierarchical View of Data.&lt;br /&gt;
We can have query like this&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;     T2.id , T2.name ,T1.id &lt;span style="color: blue;"&gt;as&lt;/span&gt; ParentId, T1.name &lt;span style="color: blue;"&gt;as&lt;/span&gt; ParentName&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; &lt;span style="color: blue;"&gt;FROM&lt;/span&gt;         Table_3 &lt;span style="color: blue;"&gt;AS&lt;/span&gt; T1 &lt;span style="color: blue;"&gt;INNER&lt;/span&gt; &lt;span style="color: blue;"&gt;JOIN&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;                       Table_3 &lt;span style="color: blue;"&gt;AS&lt;/span&gt; T2 &lt;span style="color: blue;"&gt;ON&lt;/span&gt; T1.id = T2.parentid&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
now the Task is to Arrange the Data how you want to Display..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the best&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Sandeep Prajapati&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1113941468315876880-2665016189677913080?l=ransandeep.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lG7v6_jwWTyuivU6U13eBrN01i8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lG7v6_jwWTyuivU6U13eBrN01i8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lG7v6_jwWTyuivU6U13eBrN01i8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lG7v6_jwWTyuivU6U13eBrN01i8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://feedproxy.google.com/~r/blogspot/WJWG/~3/bgJBvEFO1sQ/query-for-recursive-data.html</link><author>noreply@blogger.com (Sandeep Prajapati)</author><thr:total>0</thr:total><feedburner:origLink>http://ransandeep.blogspot.com/2010/02/query-for-recursive-data.html</feedburner:origLink></item></channel></rss>

