<?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:blogger="http://schemas.google.com/blogger/2008" 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-6104185749662767834</atom:id><lastBuildDate>Mon, 13 May 2013 16:27:39 +0000</lastBuildDate><category>xml</category><category>Positive Change</category><category>Visual Studio</category><category>JAVA</category><category>Object Relational Database</category><category>CSS</category><category>Email</category><category>SQL Server</category><category>DropdownList</category><category>SQL Server 2005</category><category>ListBox</category><category>Files</category><category>ASP.NET Control</category><category>ObjectDataSource</category><category>DataTable</category><category>Social Work</category><category>open source</category><category>Nepal</category><category>TOAD</category><category>Oracle Interview Questions</category><category>Oracle</category><category>Error Handling</category><category>Visual Studio 2010</category><category>Ajax</category><category>asp.net membership provider</category><category>Business Logic Layer</category><category>ASP.NET</category><category>ASP.NET Deployment</category><category>ADO.NET</category><category>C#</category><category>asp.net hosting</category><category>XMLHTTP</category><category>ASP.NET Design</category><category>jquery</category><category>Data Access Layer</category><category>Oracle Database</category><category>Oracle Error</category><category>plesk hosting</category><category>Eclipse</category><category>video</category><category>performance</category><category>Oracle PL/SQL Programming</category><category>ASP.NET GridView</category><category>asp.net DetailsView</category><category>User Control</category><category>JavaScript</category><category>database</category><category>Windows 7</category><title>dotNETspidor: A dot net programming blog</title><description>Experiences of an C#, asp.net web application developer with SQL, jquery, xml</description><link>http://dotnetspidor.blogspot.com/</link><managingEditor>noreply@blogger.com (Sangam Uprety)</managingEditor><generator>Blogger</generator><openSearch:totalResults>90</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/dotnetspidor" /><feedburner:info uri="dotnetspidor" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>dotnetspidor</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-6514298095905433103</guid><pubDate>Wed, 13 Mar 2013 19:47:00 +0000</pubDate><atom:updated>2013-03-15T09:11:33.396+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database</category><category domain="http://www.blogger.com/atom/ns#">Oracle PL/SQL Programming</category><category domain="http://www.blogger.com/atom/ns#">Oracle</category><category domain="http://www.blogger.com/atom/ns#">Object Relational Database</category><title>Object Relational Database Features Implemented with Oracle</title><description>Oracle is a modern and feature-full database that supports many features of an object relational database system. Oracle supports type definition, type inheritance, collection type, member function, nested table, association and aggregation relationships. In this article, I have implemented all features other than association and aggregation relationships.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Database Structure&lt;/b&gt; &lt;br /&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
I have considered a database for a simple ecommerce site. The
database will consist of different type of products having a bunch of
attributes inherited from Products table whereas each table will have
some other attributes of its own. So here I have a product object and
a Clothes table that inherits the product object. Each clothe is
available in multiple sizes. Further, each clothe tuple is available
in multiple colors represented by a collection array in this example.
For simplicity, I have included only one such table that inherits
from products table where there could be other tables like Jewellery,
Bags, Cosmetics and so on. Further, each product has multiple
categories which is implemented by a nested category table. In our
example, we charger 10% extra on the price of each product. Hence I
have used a member function that returns 10% extra of the price.&lt;/div&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
&lt;b&gt;2. Object Relational Structure&lt;/b&gt; &lt;/div&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
&lt;/div&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
Product is an object, not the table, from which another object or
type ClotheType is inherited. Product also contains a nested table
Category so that each product row contains a reference to an instance
of the table Category. Finally we create a table Clothes of the type
ClotheType. ClotheType consists of two attributes: clothesize and
clothecolor where clothesize is another Type and clothecolor is a
collection array. 
&lt;/div&gt;
&lt;div class="western" style="margin-bottom: 0in;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
The object oriented concept of function has been included in
ClotheType object which we call member function in Oracle.&lt;/div&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
&lt;b&gt;3. DDL Script for the Database Objects&lt;/b&gt;&lt;/div&gt;
&lt;div align="JUSTIFY" class="western" style="font-weight: normal; margin-bottom: 0in;"&gt;
&lt;br /&gt;&lt;/div&gt;
Create a type CategoryType
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;Create or replace type CategoryType as object(
categoryid int,
categoryname varchar2(50)
) not final
&lt;/pre&gt;
&lt;br /&gt;
Create a table of CategoryType
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;Create or replace type ProductCategory as Table of CategoryType
&lt;/pre&gt;
&lt;br /&gt;
Create an inheritable (specified by "not final" construct) object Product
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;Create or replace type Product as object(
productid int,
productname varchar2(100),
price number(7,2)
) not final
&lt;/pre&gt;
&lt;br /&gt;
Create type ProductSize
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;Create or replace type ProductSize as object(
sizecode varchar2(20),
sizevalue varchar2(20)
)
&lt;/pre&gt;
&lt;br /&gt;
Create collection array for colors
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;create or replace type ColorArray as varray(20) of varchar2(20)
&lt;/pre&gt;
&lt;br /&gt;
Create a type ClotheType that inherits from Product
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;Create or replace type ClotheType under Products(
clothesize productsize,
clothecolor colorarray,
clothecategory productcategory,
member function total_price return number
)

--define the body for the member function total_price
create or replace type body ClotheType as
 member function  total_price return number is
 begin
                 return (price + price * 0.1);  
 end;
end;
&lt;/pre&gt;
&lt;br /&gt;
Finally create a table of the type ClotheType
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;create or replace table Clothes of clothetype
nested table clothecategory store as prod_cat
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;4. Inserting rows into the Clothes table&lt;/b&gt;&lt;br /&gt;
Now we insert rows into the Clothes table.&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;  
   insert into clothes
   values(3,'V-neck tshirts with full sleeve',250,
   productsize('M','Medium'),
   colorarray('White','Blue','Black'),
          productcategory(categorytype('1','T-Shirts'),
                     categorytype('2','Men''s Wears')
   )
      );
   
   insert into clothes
   values(2,'Round-neck tshirts',450,
   productsize('L','Large'),colorarray('Red','Black','Green'),
          productcategory(categorytype('1','T-Shirts'),
                     categorytype('2','Men''s Wears')
      )
      );
     
   insert into clothes
   values(1,'Both side design tshirts',600,
   productsize('S','Small'),colorarray('Red','Blue','Black'),
             productcategory(categorytype('1','T-Shirts'),
                     categorytype('2','Men''s Wears')
      )
      );    
&lt;/pre&gt;
&lt;b&gt;5. Querying the table Clothes&lt;/b&gt;&lt;br /&gt;
a. Normal query to select the columns productid, productname, pirce and productsize's columns sizecode and sizevalue&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;select c.productid,c.productname,c.price,
 c.clothesize.sizecode,c.clothesize.sizevalue
from clothes c
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-smSGDWzhtAs/UUDVucWsldI/AAAAAAAAAQw/dv0-Js1W1UI/s1600/select+all+from+object+relational+table+Clothes+in+Oracle+database.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="select from a table in object relational database Oracle" border="0" height="220" src="http://2.bp.blogspot.com/-smSGDWzhtAs/UUDVucWsldI/AAAAAAAAAQw/dv0-Js1W1UI/s640/select+all+from+object+relational+table+Clothes+in+Oracle+database.jpg" title="select from a table in object relational database Oracle" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
b. Querying the categories in a product from the nested table clothecategory&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;select c.productid,c.productname,p.categoryid,p.categoryname
 from clothes c,table(c.clothecategory) p
where c.productid=1;

select c.productid,c.productname,p.categoryid,p.categoryname
 from clothes c,table(c.clothecategory) p
where c.productid=2;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-tDbelEgZ_2E/UUDWC4Sw_kI/AAAAAAAAAQ4/YVkGTkt4Gpc/s1600/select+from+nested+table+Category+in+Oracle+database.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="select from nested table in object relational database Oracle" border="0" height="426" src="http://2.bp.blogspot.com/-tDbelEgZ_2E/UUDWC4Sw_kI/AAAAAAAAAQ4/YVkGTkt4Gpc/s640/select+from+nested+table+Category+in+Oracle+database.jpg" title="select from nested table in object relational database Oracle" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
c. Querying the colors associated with a product&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;select c.productid, c.productname,p.*
 from clothes c, table(c.clothecolor) p
where c.productid=2;
&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/-3We1U7EEzDI/UUDWLNpvzKI/AAAAAAAAARA/LC14Btmkhq4/s1600/select+from+type+Collection+Array+in+Oracle+database.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="select from collection array in object relational database Oracle" border="0" height="284" src="http://3.bp.blogspot.com/-3We1U7EEzDI/UUDWLNpvzKI/AAAAAAAAARA/LC14Btmkhq4/s640/select+from+type+Collection+Array+in+Oracle+database.jpg" title="select from collection array in object relational database Oracle" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
d. Querying the total price by calling the member function total_price&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;select p.productid, p.productname,p.price,p.total_price() "Total Price"
 from clothes p;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-SzCxwBukrgk/UUDWW6luUwI/AAAAAAAAARI/np4qhLQAVS4/s1600/select+using+member+function+in+Oracle+database.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="select using member function in object relational database Oracle" border="0" height="166" src="http://1.bp.blogspot.com/-SzCxwBukrgk/UUDWW6luUwI/AAAAAAAAARI/np4qhLQAVS4/s640/select+using+member+function+in+Oracle+database.png" title="select using member function in object relational database Oracle" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;6.Conclusion&lt;/b&gt;
&lt;br /&gt;
&lt;div align="JUSTIFY" class="western" style="margin-bottom: 0in;"&gt;
we
realized and implemented a bunch of object relational features of
Oracle database. Some of the features we worked with were type
inheritance, type as a column, datatype collection and nested table,
as well as member function. We developed DDL script to create such
objects and performed select queries. All in all, we got the good
glimspe of object oriented programming in Oralce database.&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/oSTO9ZFvrOU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/oSTO9ZFvrOU/object-relational-database-features.html</link><author>noreply@blogger.com (Sangam Uprety)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-smSGDWzhtAs/UUDVucWsldI/AAAAAAAAAQw/dv0-Js1W1UI/s72-c/select+all+from+object+relational+table+Clothes+in+Oracle+database.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2013/03/object-relational-database-features.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-1359459264153876271</guid><pubDate>Mon, 18 Feb 2013 20:12:00 +0000</pubDate><atom:updated>2013-02-19T15:23:09.425+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">DataTable</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET GridView</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Add clickable rows in csharp DataTable and bind to asp.net gridview</title><description>Responding to a good demand from a lot of readers, I have now presented a way to create DataTable programmatically where rows accept html and hence they can be made clickable. Complementing to my previous &lt;a href="http://dotnetspidor.blogspot.com/2008/07/how-to-create-datatable.html" target="_blank"&gt;post on creating DataTable programmatically in asp.net&lt;/a&gt;, this tips will bind DataTable to an asp.net GridView where one of the columns in each row contains clickable html anchor.&lt;br /&gt;
&lt;br /&gt;
Below is the code snippet in C#.
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //get data from programmatically created DataTable and bind to GridView
            gvTable.DataSource = CreateTable();
            gvTable.DataBind();
        }
    }
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;//Create DataTable programmatically
    //In this example, there are three columns
    //namely ID, WebsiteName and URL
    private DataTable CreateTable()
    {
        //create datatable
        DataTable table = new DataTable("Websites");
        
        //add columns to the table
        table.Columns.Add("ID", typeof(int));
        table.Columns.Add("WebsiteName", typeof(string));
        table.Columns.Add("URL", typeof(string));
        //add as many rows as you want
        AddNewRow(1, "dotnetspidor", "http://dotnetspidor.blogspot.com", table);
        AddNewRow(1, "asp.net", "http://asp.net", table);
        AddNewRow(1, "codeplex", "http://codeplex.com", table);
        return table;
    }
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;//Add new row to a table
    private void AddNewRow(int id,string website, string url,DataTable table)
    {
        DataRow row = table.NewRow();
        row["ID"] = id;
        row["WebsiteName"] = website;
        //get url from GetURL method
        string link = GetURL(website, url);
        row["URL"] = HttpUtility.HtmlDecode(link);
        table.Rows.Add(row);
    }
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;//create html anchor from website name and it's url
    private string GetURL(string website, string url)
    { 
        return "&amp;lt;a href=\""+url+"\"&amp;gt;"+website+"&amp;lt;/a&amp;gt;";
    }&lt;/pre&gt;
&lt;br /&gt;
Here goes the design code for the GridView. Please note the property &lt;b&gt;HtmlEncode="false"&lt;/b&gt; in the third BoundField. This prevents the GridView from rendering encoded html so we retain the html code from our DataTable column.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="xhtml" name="code"&gt;
    &amp;lt;asp:gridview autogeneratecolumns=&amp;quot;false&amp;quot; id=&amp;quot;gvTable&amp;quot; runat=&amp;quot;server&amp;quot; width=&amp;quot;500px&amp;quot;&amp;gt;  &lt;br/&gt;            &amp;lt;columns&amp;gt;  &lt;br/&gt;                &amp;lt;asp:boundfield datafield=&amp;quot;ID&amp;quot; headertext=&amp;quot;ID&amp;quot;&amp;gt;  &lt;br/&gt;                &amp;lt;asp:boundfield datafield=&amp;quot;WebsiteName&amp;quot; headertext=&amp;quot;Website&amp;quot;&amp;gt;  &lt;br/&gt;                &amp;lt;asp:boundfield datafield=&amp;quot;URL&amp;quot; headertext=&amp;quot;URL&amp;quot; htmlencode=&amp;quot;false&amp;quot;&amp;gt;  &lt;br/&gt;            &amp;lt;/asp:boundfield&amp;gt;&amp;lt;/asp:boundfield&amp;gt;&amp;lt;/asp:boundfield&amp;gt;&amp;lt;/columns&amp;gt;  &lt;br/&gt;        &amp;lt;/asp:gridview&amp;gt;  
&lt;/pre&gt;
&lt;br /&gt;
The output looks like below.&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-sBAut2nc4HU/USKKhwXmmGI/AAAAAAAAAQY/vyqtw_4_ANk/s1600/asp-net+c-sharp+clickable+data+table+with+gridview.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-sBAut2nc4HU/USKKhwXmmGI/AAAAAAAAAQY/vyqtw_4_ANk/s1600/asp-net+c-sharp+clickable+data+table+with+gridview.jpg" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Fig: Output of programmatically generated DataTable in a gridview - with clickable row&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Happy Programming!!&lt;br /&gt;
&lt;a href="http://dotnetshoutout.com/Add-clickable-rows-in-csharp-DataTable-and-bind-to-aspnet-gridview-dotNETspidor-A-dot-net-programming-blog" rev="vote-for"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdotnetspidor.blogspot.com%2F2013%2F02%2Fadd-clickable-rows-in-csharp-datatable.html" style="border: 0px;" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/X3_7fOhZ00c" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/X3_7fOhZ00c/add-clickable-rows-in-csharp-datatable.html</link><author>noreply@blogger.com (Sangam Uprety)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-sBAut2nc4HU/USKKhwXmmGI/AAAAAAAAAQY/vyqtw_4_ANk/s72-c/asp-net+c-sharp+clickable+data+table+with+gridview.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2013/02/add-clickable-rows-in-csharp-datatable.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-4370033291354461225</guid><pubDate>Sat, 09 Feb 2013 15:29:00 +0000</pubDate><atom:updated>2013-02-09T21:14:44.030+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Strip html tags and extract subset of string from text using regular expression in c-sharp </title><description>Today I am presenting a quick tips on how to strip html from text using regular expression (with &lt;a href="http://msdn.microsoft.com/en-us/library/6f7hht7k" target="_blank"&gt;Regex&lt;/a&gt; class) in C#. In a scenario like presenting a blurb or summary of certain characters we may need to remove html tags from a html string (of news details, article details etc.). I have following function in my Helper library for the very problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;    /// &lt;summary&gt;
    /// Strip out html tags from text
    /// &lt;/summary&gt;
    /// &lt;param name="source" /&gt;Source string
    /// &lt;returns&gt;&lt;/returns&gt;
    public static string StripTagsFromHtml(string source)
    {
        return Regex.Replace(source, "&amp;lt;.*?&amp;gt;", string.Empty);
    }
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
To extract a number of characters from the source string, we can extend the function as following.
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;    /// &lt;summary&gt;
    /// Strip out html tags from text and return extract from it
    /// &lt;/summary&gt;
    /// &lt;param name="source" /&gt;Source string
    /// &lt;param name="characterCount" /&gt;Number of characters to extract
    /// &lt;returns&gt;&lt;/returns&gt;
    public static string StripTagsFromHtml(string source, int characterCount)
    {
        string stripped = Regex.Replace(source, "&amp;lt;.*?&amp;gt;", string.Empty);
        if (stripped.Length &amp;lt;= characterCount)
            return stripped;
        else
            return stripped.Substring(0, characterCount);
    }
&lt;/pre&gt;
&lt;br /&gt;
Happy programming!&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://dotnetshoutout.com/Strip-html-tags-and-extract-subset-of-string-from-text-using-regular-expression-in-c-sharp-dotNETspidor-A-dot-net-programming-blog" rev="vote-for"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdotnetspidor.blogspot.com%2F2013%2F02%2Fstrip-html-tags-and-extract-subset-of.html" style="border: 0px;" /&gt;&lt;/a&gt; &lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/Dw914IQ-WLY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/Dw914IQ-WLY/strip-html-tags-and-extract-subset-of.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2013/02/strip-html-tags-and-extract-subset-of.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-908238657198351143</guid><pubDate>Sat, 19 Jan 2013 09:49:00 +0000</pubDate><atom:updated>2013-01-19T15:19:19.414+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Eclipse</category><category domain="http://www.blogger.com/atom/ns#">JAVA</category><title>Learning Java - I am using Eclipse IDE</title><description>For a long time, I have remained asp.net web application developer. But as you prepare to bear the role of an academician also, how could you stick to only one programming framework or programming language? Yes, that has come to my life also. And I have growing appetite for learning more programming languages.&lt;br /&gt;
&lt;br /&gt;
JAVA undoubtedly brought about revolutions in so many fields. Oracle proudly declares that millions of devices run with JAVA. The academic world loves C, C++ and JAVA equally for the ongoing researches in so may fields of science and engineering.&lt;br /&gt;
&lt;br /&gt;
To get my hands dirty with the first few programs in JAVA, I downloaded &lt;a href="http://eclipse.org/" target="_blank"&gt;eclipse - the most popular Integrated Development Environment (IDE) for JAVA&lt;/a&gt;. I hope to come up with some samples soon.&lt;br /&gt;
&lt;br /&gt;
For now, to elaborate "why java?", an excerpt from &lt;a href="http://www.java.com/en/download/faq/whatis_java.xml" target="_blank"&gt;java site&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span class="bodytext"&gt;&lt;span class="bodytext"&gt;Java is a programming 
language and computing platform first released by Sun Microsystems in 
1995. 


It is the underlying technology that powers state-of-the-art programs 
including utilities, games, and business applications. Java runs on more
 than 850 million personal computers worldwide, and on billions of 
devices worldwide, including mobile and TV devices.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;span class="bodytext"&gt;&lt;span class="bodytext"&gt;Happy programming! &lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/ZpaBTMq5IeM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/ZpaBTMq5IeM/learning-java-i-am-using-eclipse-ide.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2013/01/learning-java-i-am-using-eclipse-ide.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-682064069180885600</guid><pubDate>Fri, 18 May 2012 12:06:00 +0000</pubDate><atom:updated>2013-02-22T21:16:27.443+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">jquery</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Read hidden field value in asp.net from jquery</title><description>Often we are confused about how to read values set in asp.net &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hiddenfield.aspx" target="_blank"&gt;HiddenField&lt;/a&gt; from jquery and use the values in the web form. Many-a-times we see the threads over the asp.net forums about the difficulties associated with reading asp.net HiddenField values. I have tried to give easy and fast way to read values and set values of hidden filed in asp.net using jquery.&lt;br /&gt;
You may first download the latest jquery file from &lt;a href="http://jquery.com/"&gt;jquery.com&lt;/a&gt;.&lt;br /&gt;
&lt;b&gt;asp.net webform - design page&lt;/b&gt;
&lt;br /&gt;
&lt;pre class="html" name="code"&gt;&amp;lt;body&amp;gt;
    &amp;lt;form id=\"form1\" runat=\"server\"&amp;gt;
    &amp;lt;div&amp;gt;
    &amp;lt;asp:HiddenField ID=\"HiddenField1\" runat=\"server\" /&amp;gt;
    &amp;lt;asp:Label ID=\"lblSiteName\" runat=\"server\"&amp;gt;&amp;lt;/asp:Label&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
    &amp;lt;script type=\"text/javascript\" src=\"js/jquery-1.3.2.min.js\"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=\"text/javascript\"&amp;gt;
        $(function () {
            //reading hidden field value
            var mySite = $(\'#HiddenField1\').val();
            //displaying the value in an asp.net Label control
            $(\'#lblSiteName\').html(\'My site is: \' + mySite);
            //setting value of HiddenField control
            $(\'#HiddenField1\').val(\'New site is: http://asp.net\')
        });
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;&lt;/pre&gt;
&lt;b&gt;asp.net webform - code page (in c#)&lt;/b&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HiddenField1.Value = "http://dotnetspidor.blogspot.com";
        }
    }&lt;/pre&gt;
&lt;b&gt;Known issue&lt;/b&gt;&lt;br /&gt;
If you have put the asp.net HiddenField control below the script tags, you may end up reading 'undefined' values. To solve the issue, I recommend putting the hidden fields at the top of the page just below the form tag.&lt;br /&gt;
Further, if you are using asp.net &lt;a href="http://msdn.microsoft.com/en-us/library/wtxbf3hh.aspx" target="_blank"&gt;Master Page&lt;/a&gt;, please make changes in the jquery codes respectively. In such case, I&amp;nbsp; recommend the following syntax:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
var mySite=$('[id$=HiddenField1]').val();&lt;/blockquote&gt;
The system $= means the value that end with HiddenField1. This works since you usually see the id HiddenFiled1 used with master page rendered as ctl00_ContentPlaceholder1_HiddenField1.&lt;br /&gt;
&lt;br /&gt;
Happy programming!!&lt;br/&gt;
&lt;a rev="vote-for" href="http://dotnetshoutout.com/Read-hidden-field-value-in-aspnet-from-jquery-dotNETspidor-A-dot-net-programming-blog"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdotnetspidor.blogspot.com%2F2012%2F05%2Fread-hidden-field-value-in-aspnet-from.html" style="border:0px"/&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/Y0Bc1RWV-ac" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/Y0Bc1RWV-ac/read-hidden-field-value-in-aspnet-from.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>2</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2012/05/read-hidden-field-value-in-aspnet-from.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-8006323220773322047</guid><pubDate>Fri, 27 Apr 2012 04:01:00 +0000</pubDate><atom:updated>2012-04-27T09:31:29.816+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>Expecting non-empty string for 'providerInvariantName' parameter - database connection error in asp.net web application</title><description>Just a simple accidental error in asp.net web application's web.config file, and you see the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
Expecting non-empty string for 'providerInvariantName' parameter. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. &lt;br /&gt;&lt;br /&gt; Exception Details: System.ArgumentException: Expecting non-empty string for 'providerInvariantName' parameter.&lt;/blockquote&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ZCtVY43bWUw/T5oYOkhT_II/AAAAAAAAANY/YsbMgdfOqTw/s1600/expecting+non-empty+string+for+providerInvariantName+parameter+in+asp.net+website+-+database+open+connection+error.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="276" src="http://2.bp.blogspot.com/-ZCtVY43bWUw/T5oYOkhT_II/AAAAAAAAANY/YsbMgdfOqTw/s640/expecting+non-empty+string+for+providerInvariantName+parameter+in+asp.net+website+-+database+open+connection+error.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Fig. 1 Error page showing providerInvariantName parameter error for asp.net web application's database connection error&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;The error occurred only because I had missed the providerName property in my connection string.&lt;br /&gt;
My connection string is:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;connectionStrings&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;add name="ConnectionString" connectionString="data source=my-pc;Integrated Security=true;Initial Catalog=mydbname"&lt;br /&gt;&amp;nbsp;&amp;nbsp; providerName="System.Data.SqlClient" /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/connectionStrings&amp;gt;&lt;/blockquote&gt;
And accidentally it was broken like:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;connectionStrings&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;add name="ConnectionString" connectionString="data source=my-pc;Integrated Security=true;Initial Catalog=mydbname" /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/connectionStrings&amp;gt; &lt;/blockquote&gt;
I was stunned to get the error when I had just finished uploading the web application to my host. After some googling, I found the cause and fixed the error. It worked. Happy programming!&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/0uqSU8nIKUk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/0uqSU8nIKUk/expecting-non-empty-string-for.html</link><author>noreply@blogger.com (Sangam Uprety)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-ZCtVY43bWUw/T5oYOkhT_II/AAAAAAAAANY/YsbMgdfOqTw/s72-c/expecting+non-empty+string+for+providerInvariantName+parameter+in+asp.net+website+-+database+open+connection+error.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2012/04/expecting-non-empty-string-for.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-8216650093536923443</guid><pubDate>Fri, 20 Apr 2012 12:51:00 +0000</pubDate><atom:updated>2012-04-20T18:24:35.287+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">jquery</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Flexible jquery based modal box or popup box -ColorBox</title><description>I have been using the &lt;a href="http://plugins.jquery.com/" target="_blank"&gt;jquery plugins&lt;/a&gt; for long. Many times I do need to implement facebook-like photo viewer in gallery pages. Similarly, mostly in admin pages of my &lt;a href="http://asp.net/"&gt;asp.net&lt;/a&gt; web applications, I frequently us modal pop-ups for various purposes like ajax loading of content, iframe loading from other internal pages, confirmation and error show ups. Typically I used to go for separate plugins for the purpose. Lately I found the &lt;a href="http://www.jacklmoore.com/colorbox" target="_blank"&gt;ColorBox&lt;/a&gt; plugin that satisfies both the needs. In one sense, this is a framework for me. You can visit&amp;nbsp; &lt;a href="http://www.jacklmoore.com/colorbox" target="_blank"&gt;ColorBox&lt;/a&gt; and explore it.&lt;br /&gt;
&lt;br /&gt;
Lets look at the features the ColorBox jquery plugin possesses. &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;ul&gt;
&lt;li&gt;Supports photos, grouping, slideshow, ajax, inline, and iframed content.&lt;/li&gt;
&lt;li&gt;Lightweight: 10KB of JavaScript (less than 5KBs gzipped).&lt;/li&gt;
&lt;li&gt;Appearance is controlled through CSS so it can be restyled.&lt;/li&gt;
&lt;li&gt;Can be extended with callbacks &amp;amp; event-hooks without altering the source files.&lt;/li&gt;
&lt;li&gt;Completely unobtrusive, options are set in the JS and require no changes to existing HTML.&lt;/li&gt;
&lt;li&gt;Preloads upcoming images in a photo group.&lt;/li&gt;
&lt;li&gt;Well vetted. ColorBox is one of the &lt;a href="http://blog.builtwith.com/2011/10/31/jquery-version-and-usage-report/" title="see bottom pie-graph"&gt;top jQuery plugins&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
For &lt;a href="http://jquery.com/" target="_blank"&gt;jquery 1.3.2+&lt;/a&gt;, ColorBox has its &lt;a href="http://www.jacklmoore.com/colorbox/colorbox-1.3.18.zip" target="_blank"&gt;older version&lt;/a&gt;, whereas for &lt;a href="http://jquery.com/" target="_blank"&gt;jquery 1.4.3+&lt;/a&gt;, ColorBox has its &lt;a href="http://www.jacklmoore.com/colorbox/colorbox.zip" target="_blank"&gt;news version&lt;/a&gt;.&lt;br /&gt;
Meantime, you may also enjoy browsing &lt;a href="http://dotnetspidor.blogspot.com/search/label/jquery" target="_blank"&gt;jquery with asp.net&lt;/a&gt; tips in this blog. To sate the appetite of enthusiasts, I have also posted a bunch of &lt;a href="http://dotnetspidor.blogspot.com/search/label/JavaScript" target="_blank"&gt;javascript with asp.net&lt;/a&gt; related tips and tricks which you may find useful in your asp.net web development career. Cheers! &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2012%2f04%2fflexible-jquery-based-modal-box-or.html"&gt;&lt;img alt="kick it on DotNetKicks.com" border="0" src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2012%252f04%252fflexible-jquery-based-modal-box-or.html" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/Pz5IVewNCBw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/Pz5IVewNCBw/flexible-jquery-based-modal-box-or.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2012/04/flexible-jquery-based-modal-box-or.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-2901456265386462857</guid><pubDate>Thu, 12 Apr 2012 06:08:00 +0000</pubDate><atom:updated>2012-04-12T11:46:31.748+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">asp.net hosting</category><category domain="http://www.blogger.com/atom/ns#">plesk hosting</category><title>Domain without www not working from plesk hosting</title><description>I use plesk hosting for my company. An error I got (and shocked with it!) was that my domain was displaying the correct site with :&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
http://mysitedomain.com&lt;/blockquote&gt;
But did not work with:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
http://www.mysitedomain.com&lt;/blockquote&gt;
Later it was traced that, by default the www was not included while creating the domain.&lt;br /&gt;
So if you are creating a domain, don't forget to inlcude www (by checking a checkbox next to www). That will keep yourself away from the worry.&lt;br /&gt;
If you have already created the domain and have the problem, you can always go and edit the domain (from the very first page that lists all the domains) and update it to include www.&lt;br /&gt;
Cheers!&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2012%2f04%2fdomain-without-www-not-working-from.html"&gt;&lt;img alt="kick it on DotNetKicks.com" border="0" src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2012%252f04%252fdomain-without-www-not-working-from.html" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/TZdyOrXGfFY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/TZdyOrXGfFY/domain-without-www-not-working-from.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>1</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2012/04/domain-without-www-not-working-from.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-2191413137900505482</guid><pubDate>Thu, 22 Mar 2012 06:04:00 +0000</pubDate><atom:updated>2012-03-22T11:41:31.867+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server 2005</category><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>The database principal owns a schema in the database, and cannot be dropped</title><description>While restoring a database backup file in my hosting I was prompted with some error message regarding existing user in the database. So I decided to delete those users. But while trying to delete the users from my local sql sever management studio, error occurred.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
The database principal owns a schema in the database, and cannot be dropped.&lt;/blockquote&gt;
I tried out browsing the property of the user and removing the assigned scheme from the lists. It was somehow unsucessful. So I decided to go search for the solution and stumbled at doing it the most powerful way - through command.&lt;br /&gt;
Here goes the solution - Revoke the database schema assigned to the user and assign it back to the default db object.&lt;br /&gt;
&lt;span style="color: red;"&gt;ALTER AUTHORIZATION ON SCHEMA :: my_user_name to db_owner&lt;/span&gt; &lt;br /&gt;
&amp;nbsp;If you want to assign the schema&amp;nbsp; to another user, here is how you accomplish it.&lt;br /&gt;
&lt;div style="color: red;"&gt;
&amp;nbsp;ALTER AUTHORIZATION ON SCHEMA :: my_schema_name to my_user_name&lt;/div&gt;
Cheers!&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2012%2f03%2fdatabase-principal-owns-schema-in.html"&gt;&lt;img alt="kick it on DotNetKicks.com" border="0" src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2012%252f03%252fdatabase-principal-owns-schema-in.html" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/eRPCnqHI5ZQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/eRPCnqHI5ZQ/database-principal-owns-schema-in.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2012/03/database-principal-owns-schema-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-6059413402576665682</guid><pubDate>Mon, 05 Mar 2012 09:12:00 +0000</pubDate><atom:updated>2012-03-05T14:42:42.975+05:30</atom:updated><title>Invitation to connect on LinkedIn</title><description>&lt;table border="0" cellspacing="0" cellpadding="0" style="font-family:Arial;" width="100%" bgcolor="#F4F4F4"&gt;&lt;tr&gt;&lt;td align="center"&gt;     &lt;table border="0" cellspacing="0" cellpadding="0" style="font-family:Arial;" width="550"&gt;   &lt;tr&gt;&lt;td&gt;     &lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:10px;font-size:10px;line-height:10px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;   &lt;/td&gt;&lt;/tr&gt;   &lt;tr&gt;&lt;td align="left"&gt;     &lt;img src="http://www.linkedin.com/scds/common/u/img/logos/logo_emails_trans_98x24.png" alt="LinkedIn" border="0" height="24" width="98"&gt;   &lt;/td&gt;&lt;/tr&gt;   &lt;tr&gt;&lt;td&gt;     &lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:10px;font-size:10px;line-height:10px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;   &lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;  &lt;table border="0" cellspacing="0" cellpadding="0" style="font-family:Arial;border:solid 1px #DDDDDD;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;" bgcolor="#FFFFFF" width="550"&gt;&lt;tr&gt;&lt;td colspan="3"&gt;&lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:15px;font-size:15px;line-height:15px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="1%"&gt;&lt;table width="15" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:0px;font-size:0px;line-height:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;td width="98%" valign="top" align=""&gt;   &lt;table border="0" cellspacing="0" cellpadding="0" style="font-family:Arial;" width="100%"&gt;     &lt;tr&gt;         &lt;td width="50" rowspan="3" valign="top"&gt;             &lt;IMG alt="sangam uprety" border="0" height="40" style="padding:5px" src="http://media.linkedin.com/media/p/4/000/12c/3c4/13138bd.jpg" width="40"&gt;         &lt;/td&gt;         &lt;td rowspan="3"&gt;&lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:0px;font-size:0px;line-height:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;       &lt;td style="font-family:Arial,sans-serif;font-size:12px"&gt;         &lt;div&gt;           &lt;b style="font-size:16px;margin-right:12px"&gt;From sangam uprety&lt;/b&gt;         &lt;/div&gt;            &lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:6px;font-size:6px;line-height:6px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;            &lt;div style="color:#666666"&gt;Executive Director at Time Infotech&lt;/div&gt;             &lt;div style="color:#666666"&gt;Nepal&lt;/div&gt;         &lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:16px;font-size:16px;line-height:16px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td style="border:1px dotted #DDDDDD;border-width:1px 0"&gt;         &lt;table border="0" cellspacing="0" cellpadding="0" style="font-family:Arial;background:#F2FAFF;width:100%" &gt;         &lt;tr&gt;&lt;td colspan="3"&gt;&lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:4px;font-size:4px;line-height:4px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;         &lt;tr&gt;           &lt;td&gt;&lt;table width="5" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:0px;font-size:0px;line-height:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;           &lt;td style="font-family:Arial,sans-serif;font-size:12px"&gt;             &lt;p&gt;               I'd like to add you to my professional network on LinkedIn.&lt;br/&gt; &lt;br/&gt; - sangam             &lt;/p&gt;           &lt;/td&gt;           &lt;td&gt;&lt;table width="5" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:0px;font-size:0px;line-height:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;         &lt;/tr&gt;         &lt;tr&gt;&lt;td colspan="3"&gt;&lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:5px;font-size:5px;line-height:5px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;         &lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:12px;font-size:12px;line-height:12px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;           &lt;table border="0" cellpadding="6" cellspacing="1" align=""&gt;&lt;tr&gt;&lt;td align="center" valign="middle" bgcolor="#FFE86C" background="http://www.linkedin.com/scds/common/u/img/bg/yellow_button_back.png" style="background:url(http://www.linkedin.com/scds/common/u/img/bg/yellow_button_back.png) repeat-x scroll 100% 0 #FFE86C;background-color:#FFE86C;border:1px solid #E8B463;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;"&gt;&lt;div style="padding-right:10px;padding-left:10px;"&gt;&lt;a href="https://www.linkedin.com/e/-dhu8fd-gzfakpn3-w/isd/6164608913/Y8or_ZWD/?hs=false&amp;amp;tok=1I5JwkqSCEul81" style="text-decoration:none;"&gt;&lt;span style="font-size:12px;font-family:Arial;font-weight:bold;color:#333333;white-space:nowrap;display:block;"&gt;Confirm that you know sangam&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt; &lt;/td&gt;&lt;td width="1%"&gt;&lt;table width="15" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:0px;font-size:0px;line-height:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="3"&gt;&lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:15px;font-size:15px;line-height:15px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:5px;font-size:5px;line-height:5px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;table border="0" cellspacing="0" cellpadding="0" style="font-family:Arial;width:550px" &gt;   &lt;tr&gt;     &lt;td style="color:#999;font-family:Arial,sans-serif;font-size:11px;line-height:15px"&gt;       &lt;div&gt;You are receiving Invitation to Connect emails. &lt;a href="http://www.linkedin.com/e/-dhu8fd-gzfakpn3-w/u9HRfuHz66GqN8qhcwAlrO7d7ltdNQGrXR7goRwva3vXXKpvgaQv8E2/goo/sangam%2Euprety%2Eiasuilik100%40blogger%2Ecom/20061/I2142370632_1/?hs=false&amp;amp;tok=2nfjuC01GEul81"&gt;Unsubscribe&lt;/a&gt;&lt;/div&gt;       &lt;div&gt;&amp;copy; 2012, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA&lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:1px;font-size:1px;line-height:1px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;     &lt;/td&gt;   &lt;/tr&gt; &lt;/table&gt;       &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;   &lt;img src="http://www.linkedin.com/emimp/-dhu8fd-gzfakpn3-w.gif" style="width:1px; height:1px;"/&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/YmgNbqPmsng" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/YmgNbqPmsng/invitation-to-connect-on-linkedin.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2012/03/invitation-to-connect-on-linkedin.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-4641212664469020801</guid><pubDate>Tue, 07 Feb 2012 07:56:00 +0000</pubDate><atom:updated>2012-02-07T13:27:17.220+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows 7</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2005</category><title>Installing sql server 2005 express in windows 7</title><description>If you started with sql server 2005 express editions in your windows vista or xp operating systems, you are sure to stumble while installing sql server 2005 express in windows 7. After having long time experience of sql server 2005 express in my windows vista, I just switched to windows 7 and tried same version of express in it. But it is not supported. You get the failure message sort of:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
This software is not supported in this version of operating system. &lt;/blockquote&gt;
The simple solution is to acquire &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=15291" target="_blank"&gt;SQL Server 2005 Express Service Pack 3&lt;/a&gt;. Choose 32 bit or 64 bit version according to your machine.&lt;br /&gt;
&lt;br /&gt;
The story does not finish yet. If you are looking for sql server management studio express, you again have to look for service pack 3 of sql server 2005 management studio. Get &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=14630" target="_blank"&gt;SQL Server 2005 Management Studio Express Service Pack 3&lt;/a&gt; and get installed in your machine. Still don't forget to choose right version matching to your machine (32 or 64 bit).&lt;br /&gt;
&lt;br /&gt;
Happy upcoming Valentine's Day!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/iwvpXenW18w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/iwvpXenW18w/installing-sql-server-2005-express-in.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>2</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2012/02/installing-sql-server-2005-express-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-1190485405906879955</guid><pubDate>Fri, 30 Dec 2011 06:28:00 +0000</pubDate><atom:updated>2011-12-30T12:04:58.767+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Social Work</category><category domain="http://www.blogger.com/atom/ns#">Positive Change</category><title>Prove that programmers too can be social change makers : last day to vote for a social work</title><description>A dream to provide solar and computer to a school in rural Nepal! It can be realized by your single vote. Please vote for it at &lt;a href="http://sunsuperdreams.com.au/dream/view/solar-and-computers-to-a-school-in-rural-nepal" target="_blank"&gt;Solar and Computers to a School in Rural Nepal&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
Appeal from the dreamer - read below please. &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
My dream is to help a school in an extremely remote village of Western 
Nepal to buy and install a solar system, batteries, inverters, computers
 and printers necessary for the school for its computer lab and 
e-library. The school was built with support from local people and some 
of the colleges and students of Kathmandu.&lt;br /&gt;
&lt;br /&gt;
Lalu village where the school is located lacks basic infrastructure, 
however with the local people driving it, the school is a vehicle to 
bring the community into the 21st century.&lt;br /&gt;
&lt;br /&gt;
The school has very innovative ideas that make it unique. Firstly, 
Modern Model Residential School is a rural based purely service oriented
 co-educational English medium primary institution registered as 
Non-profit Distributing Company. Secondly, it strives to be a 
progressive institution that acts as a hub for the community, imparting 
education mixed with modern technology. &lt;br /&gt;
&lt;br /&gt;
Using a pro-rata system the school is able to provide quality education 
to people of the entire community. Orphaned, disadvantaged or disabled 
students and families are admitted free of charge, whilst others 
contribute as little as $3 per month. This shows how even a small amount
 can change not only the students’ lives but their families and the 
entire community.&lt;br /&gt;
&lt;br /&gt;
Kalikot is amongst one of the world's most impoverished areas. “57% of 
people in Kalikot district live under extreme poverty. Per capita income
 lies at Rs. 6000 (around $ 83) per year and average life expectancy 
remains at just 42. Only 57.27% of children are literate where as 
overall literacy rate is at just 38.47%. Still 45.95% of children 
involve in some kinds of economic activity instead of going to school.” 
-Central Bureau of Statistics of Nepal, District Profile, Kalikot 2008 
AD .&lt;/blockquote&gt;
Please don't forget that your single click can make it happen. Time is too short to stop and think. Help to realize the dream and be proud of it! Click &lt;a href="http://sunsuperdreams.com.au/dream/view/solar-and-computers-to-a-school-in-rural-nepal" target="_blank"&gt;Solar and Computers to a School in Rural Nepal&lt;/a&gt; to vote!&lt;br /&gt;
&lt;br /&gt;
Yes, programmers too can be social workers!&lt;br /&gt;
&lt;br /&gt;
Thank you!&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/Eh0KueT5CDk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/Eh0KueT5CDk/prove-that-programmers-too-can-be.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/12/prove-that-programmers-too-can-be.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-3232553749343811098</guid><pubDate>Tue, 27 Dec 2011 02:57:00 +0000</pubDate><atom:updated>2011-12-30T12:00:30.277+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">video</category><category domain="http://www.blogger.com/atom/ns#">open source</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>CamStudio - Free Streaming Video Desktop Recording Software</title><description>&lt;a href="http://camstudio.org/"&gt;CamStudio&lt;/a&gt; a really useful desktop based software that you can use for recording anything that happens with your desktop. And the best part is it is distributed under &lt;a href="http://www.blogger.com/en.wikipedia.org/wiki/GNU_General_Public_License"&gt;GNU General Public License (GPL)&lt;/a&gt; license. Free to use for both commercial and non-commercial uses.

So what are the uses? Let me recite the site itself:

&lt;br /&gt;
&lt;blockquote&gt;
CamStudio is able to record all screen and audio activity on your computer and create industry-standard AVI video files and using its built-in SWF Producer can turn those AVIs into lean, mean, bandwidth-friendly Streaming Flash videos (SWFs)

Here are just a few ways you can use this software:

    You can use it to create demonstration videos for any software program
    Or how about creating a set of videos answering your most frequently asked questions?
    You can create video tutorials for school or college class
    You can use it to record a recurring problem with your computer so you can show technical support people
    You can use it to create video-based information products you can sell
    You can even use it to record new tricks and techniques you discover on your favourite software program, before you forget them&lt;/blockquote&gt;
How to get the software? How to use this? Yes, it is very easy. Watch the video on &lt;a href="http://www.metacafe.com/watch/735296/how_to_record_your_desktop/"&gt;how to capture video from your desktop&lt;/a&gt; and you are easy to begin!

Why this post?
Any open source products like this one is a great contribution to the whole world. So this just a give-back to the great effort. I have just tried to spread the word. Could you please do the same? Thank you!&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/oVuTXmV3-Xs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/oVuTXmV3-Xs/camstudio-free-streaming-video-desktop.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/12/camstudio-free-streaming-video-desktop.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-7500196072740062299</guid><pubDate>Tue, 22 Nov 2011 10:42:00 +0000</pubDate><atom:updated>2011-11-22T17:54:19.337+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">jquery</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Working with dropdownlist or combobox using jquery</title><description>More often programmers need to work with dropdownlist or combobox using jquery. We need to manipulate the dropdownlist options using jquery scripting. And it is the case that almost always we don't remember how to implement jquery selector. And for all of my readers, who are enthusiastic programmers and/or designers, and for myself, I am discussing in this post the actions with jquery to manipulate asp.net dropdownlist options.
&lt;pre name="code" class="html"&gt;
&lt;asp:DropdownList runat="server" id="ddlTest"&gt;
&lt;asp:ListItem Text="Nepalese Handicraft Products" Value="Nepal"/&gt;
&lt;asp:ListItem Text="Indian Handicraft Products" Value="India"/&gt;
&lt;/asp:DropdownList&gt;
&lt;/pre&gt;
Now append another option using jquery.
&lt;pre name="code" class="javascript"&gt;
$('[id$=ddlTest]').append('&lt;option value="Others"&gt;Others&lt;/option&gt;');
&lt;/pre&gt;

[Why am I using the selector syntax $('[id$=ddlTest]') instead of $('#ddlTest')?
We use #ControlID to select a control with specified id. $= means 'select a control whose id ends with specified value. If you are using master page, the rendered id of the dropdownlist is preceded with some text.]

Now get the selected value from the dropdownlist.
&lt;pre name="code" class="javascript"&gt;
var selVal=$('[id$=ddlTest]').val();
&lt;/pre&gt;

Now get the selected texct from the dropdownlist.
&lt;pre name="code" class="javascript"&gt;
var selTxt=$('[id$=ddlTest] option:selected').text();
&lt;/pre&gt;

Now, select a value programmatically.
&lt;pre name="code" class="javascript"&gt;
var selTxt=$('[id$=ddlTest]').val('Nepal');
&lt;/pre&gt;
And I hope you are comfortable with detecting through jquery when the use selects an item.
Good luck!&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2011%2f11%2fworking-with-dropdownlist-or-combobox.html"&gt;&lt;img src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2011%252f11%252fworking-with-dropdownlist-or-combobox.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/tLa18QkeQtQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/tLa18QkeQtQ/working-with-dropdownlist-or-combobox.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/11/working-with-dropdownlist-or-combobox.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-7188870713672225823</guid><pubDate>Tue, 18 Oct 2011 12:36:00 +0000</pubDate><atom:updated>2011-10-18T18:07:00.292+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Visual Studio 2010</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><title>Missing File menu in visual studio 2010</title><description>I just got irritated to see the file menu in visual studio 2010 missing. All other items of the menu, e.g. Edit, View, Refactor, Project, Build etc. were showing. Only mischievous was the File item. It would be of no value for me if only I could add new project in an existing project. But I couldn't find any such option. I had to workout to recover my lost menu item back. And the way is as discussed below.
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-C_onknIZrPk/Tp1yqaUwDbI/AAAAAAAAAJQ/PLCctDcIFMw/s1600/File%2Bmenu%2Bmissing%2Bin%2Bvisual%2Bstudio%2B2010.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="133" width="400" src="http://1.bp.blogspot.com/-C_onknIZrPk/Tp1yqaUwDbI/AAAAAAAAAJQ/PLCctDcIFMw/s400/File%2Bmenu%2Bmissing%2Bin%2Bvisual%2Bstudio%2B2010.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;


1. Run Visual Studio Command Prompt for VS2010 as Administrator
2. Navigate to C:\Program Files\Microsoft Visual Studio 10.0\Common 7
3. Run devenv with the option /ResetSettings
4. Press enter 
This will reset the default settings for the visual studio and open it.
Now you see the missing File item. Thanks.&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/lLE7AEHMrOE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/lLE7AEHMrOE/missing-file-menu-in-visual-studio-2010.html</link><author>noreply@blogger.com (Sangam Uprety)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-C_onknIZrPk/Tp1yqaUwDbI/AAAAAAAAAJQ/PLCctDcIFMw/s72-c/File%2Bmenu%2Bmissing%2Bin%2Bvisual%2Bstudio%2B2010.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/10/missing-file-menu-in-visual-studio-2010.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-6300275390652378471</guid><pubDate>Thu, 29 Sep 2011 08:03:00 +0000</pubDate><atom:updated>2011-09-30T17:28:45.905+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET Control</category><category domain="http://www.blogger.com/atom/ns#">jquery</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Disable button in asp net web page to prevent multiple clicks</title><description>&lt;span xmlns=""&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=""&gt;When a user clicks a button and the response is slow, there are chances that user may click the button again. The scenario may occur both when the button postbacks synchronously or asynchronously. This type of multiple clicks could be prevented if we could just disable the button just after the first click and enable it again when the processing is done. This is quite easy to implement the task in both the cases: synchronous and asynchronous postbacks.&lt;/span&gt;&lt;br /&gt;Before we jump on the topic, you may learn &lt;a href="http://dotnetspidor.blogspot.com/2009/05/click-button-on-keypress-in-aspnet.html"&gt;how to click a button on enter key press in an asp.net textbox control&lt;/a&gt;. Similarly you may be interested in displaying &lt;a href="http://dotnetspidor.blogspot.com/2009/03/watermark-aspnet-textbox-using.html"&gt;google search-like watermark in an asp.net textbox control&lt;/a&gt;. Both the tutorials help you work with asp.net button control more interactively.&lt;br/&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-p03SjeETaxs/ToQl1DVTHZI/AAAAAAAAAJI/jKR06IgLgzc/s1600/how+to+disable+button+in+postback+-+c-sharp-asp.net+-+after+button+click.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-p03SjeETaxs/ToQl1DVTHZI/AAAAAAAAAJI/jKR06IgLgzc/s1600/how+to+disable+button+in+postback+-+c-sharp-asp.net+-+after+button+click.jpg" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Fig. 1: Just after clicking asp.net button&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-MoH-5ZFxnD8/ToQlq3mSGbI/AAAAAAAAAJE/2s5nWx-l4yw/s1600/how+to+disable+button+in+postback+-+c-sharp-asp.net+-+after+postback.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-MoH-5ZFxnD8/ToQlq3mSGbI/AAAAAAAAAJE/2s5nWx-l4yw/s1600/how+to+disable+button+in+postback+-+c-sharp-asp.net+-+after+postback.jpg" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Fig. 2: After postback occurs&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;span xmlns=""&gt;If you are using ajax processing on button click, just disable the button when it is clicked and enable it when the ajax processing is done. If you are using full postback on button click, you may just make the button invisible using client-side-scripting when the click occurs. And you don't need to worry about making it visible since after postback the page will be rendered again, with the button visible as usual. In the snippet below I have shown how to 'disable' (in fact disabling won't work since the server side event is not firing) the asp.net button from client side when it is clicked.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div style="color: red;"&gt;
&lt;b&gt;&lt;span xmlns=""&gt;1. Add reference to jquery file&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span xmlns=""&gt;&lt;/span&gt;
&lt;pre class="html" name="code"&gt;
&lt;span xmlns=""&gt;&lt;script src="js/jquery.js" type="text/javascript"&gt;
&lt;/script&gt;&lt;/span&gt;
&lt;span xmlns=""&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span xmlns=""&gt;&lt;b style="color: red;"&gt;2. Design the web form&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class="html" name="code"&gt;
&lt;form id="form1" runat="server"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;asp:label id="lblMsg" runat="server"&gt;&lt;/asp:label&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;asp:button id="Button1" onclick="Button1_Click" runat="server" text="Click Me!"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span id="spanMsg" style="display: none;"&gt;Processing..&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/asp:button&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/form&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/pre&gt;
&lt;div style="color: red;"&gt;
&lt;b&gt;3. Write the client scripting function with jquery&lt;/b&gt;&lt;/div&gt;
&lt;pre class="javascript" name="code"&gt;
&lt;script type="text/javascript"&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(function(){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $('[id$=Button1]').click(function(){&lt;br&gt;
&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; $(this).css('display','none');&lt;br&gt;
&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; $('span#spanMsg').show();&lt;br&gt;
&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;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&lt;/script&gt;
&lt;/pre&gt;
&lt;div style="color: red;"&gt;
&lt;b&gt;4. The code-behind.&lt;/b&gt;&lt;/div&gt;
&lt;pre class="c-sharp" name="code"&gt;
protected void Button1_Click(object sender, EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lblMsg.Text +="Current time : "+ DateTime.Now.ToLongTimeString()+"
";
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&lt;/pre&gt;
That's all. When you click the button you catch the client side click event and make the button just invisible. Meantime show 'processing' or similar message. If you love &lt;a href="http://www.ajaxload.info/"&gt;ajax loading image&lt;/a&gt;, generate one and show it. From codebehind I have just displayed current time in a label.&lt;br /&gt;
&lt;span xmlns=""&gt;Happy &lt;a href="http://www.visitnepal.com/nepal_information/dashain.php"&gt;Bijaya Dashami&lt;/a&gt; (Dashain - the greatest festival of Hindus)!&lt;/span&gt;&lt;br/&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2010%2f01%2fdisable-button-in-asp-net-web-page-to.html"&gt;&lt;img src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2010%252f01%252fdisable-button-in-asp-net-web-page-to.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/rjROnAbIYtk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/rjROnAbIYtk/disable-button-in-asp-net-web-page-to.html</link><author>noreply@blogger.com (Sangam Uprety)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-p03SjeETaxs/ToQl1DVTHZI/AAAAAAAAAJI/jKR06IgLgzc/s72-c/how+to+disable+button+in+postback+-+c-sharp-asp.net+-+after+button+click.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2010/01/disable-button-in-asp-net-web-page-to.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-8044384311421082332</guid><pubDate>Mon, 26 Sep 2011 09:32:00 +0000</pubDate><atom:updated>2011-09-26T15:07:03.283+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server 2005</category><category domain="http://www.blogger.com/atom/ns#">database</category><title>Exclusive access could not be obtained because database is in use-sql server restore database error</title><description>While publishing a website to the web server, I took backup of my database. Now I had abc.backup at my hand. Next step was to create a database in the sql server of my host. I did it. Then I uploaded the backup file to the server. When I tried to restore the database I got following error:
&lt;br /&gt;
&lt;blockquote&gt;
Exclusive access could not be obtained because the database is in use&lt;/blockquote&gt;
This error normally discourages because we wonder what exclusive access is this that we need to successfully restore the database. After searching a while you come to conclusion that the database to which we are restoring our backup is in use by one or some users you have already added. The popular solution is - &lt;b&gt;temporarily isolate the user from the database&lt;/b&gt; Easy, if you run this command at your server:
&lt;br /&gt;
&lt;pre class="Sql" name="code"&gt;Use master
go

Alter Database mydbname
SET SINGLE_USER With ROLLBACK IMMEDIATE

 RESTORE DATABASE mydbname
 FROM DISK = 'C:\abc.bak'
&lt;/pre&gt;
Now you are right if you suspect whether we should the roll back to multi user.
Yes this way:
&lt;br /&gt;
&lt;pre class="Sql" name="code"&gt;Use master;
go

ALTER DATABASE mydbname

SET MULTI_USER;
go
&lt;/pre&gt;
Note that we run the commands against the master database, not the candidate database itself.
And did I do the same last time? Nope. I was just happening with a slight mistake. I had created users for the db before I restored the database. So to save yourself from all those stuffs explained above, just create the database in the server, restore your backup file to it and only then create the database users. Done! Thanks.&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2011%2f09%2fexclusive-access-could-not-be-obtained.html"&gt;&lt;img alt="kick it on DotNetKicks.com" border="0" src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2011%252f09%252fexclusive-access-could-not-be-obtained.html" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/Pl_3hxPoxu4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/Pl_3hxPoxu4/exclusive-access-could-not-be-obtained.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>2</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/09/exclusive-access-could-not-be-obtained.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-6100470859909507558</guid><pubDate>Thu, 22 Sep 2011 13:30:00 +0000</pubDate><atom:updated>2011-09-22T19:37:21.780+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined</title><description>Last time I got the following error: 
&lt;br /&gt;
&lt;blockquote&gt;
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.&lt;/blockquote&gt;
See in the image below the follo&lt;i&gt;&lt;/i&gt;wing config error, and also watch the config source.
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-CH1_Uuya6bs/Tns9ERg0IAI/AAAAAAAAAI8/VZpVi4POpIE/s1600/duplicate-system.web.extensions-requested-page-cannot-be-accessed.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="329" src="http://3.bp.blogspot.com/-CH1_Uuya6bs/Tns9ERg0IAI/AAAAAAAAAI8/VZpVi4POpIE/s640/duplicate-system.web.extensions-requested-page-cannot-be-accessed.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;blockquote&gt;
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined&lt;sectiongroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;&lt;/sectiongroup&gt;&lt;/blockquote&gt;
&lt;b&gt;Root of the error&lt;/b&gt;&lt;br /&gt;
I got the error when I was deploying a web application precompiled in asp.net 2.0 onto the production server with asp.net 4.0.
The simple search reveals that it is known issues with VS 2010 and asp.net 2.0. But my site is asp.net 2.0 enabled. What's the root of the error then?
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;My conclusion (and please correct me if necessary)&lt;/b&gt;
I have configured asp.net web extension namespaces in my web.config file. You don't see this in asp.net 3.5 and 4.0 enabled sites since servers with asp,net 3.5/4.0 by default server asp.net ajax services. But asp.net 2.0 has to be ajax enabled by installing asp.net ajax extension 1.0 which you can &lt;a href="http://www.google.com.np/url?sa=t&amp;amp;source=web&amp;amp;cd=1&amp;amp;sqi=2&amp;amp;ved=0CBQQFjAA&amp;amp;url=http%3A%2F%2Fwww.microsoft.com%2Fdownload%2Fen%2Fdetails.aspx%3Fid%3D883&amp;amp;rct=j&amp;amp;q=asp.net%20ajax%20extensions%201.0&amp;amp;ei=YDV7TrbkEIrtrQem5NnCDw&amp;amp;usg=AFQjCNF-npeIEMOtNbaQCQ5b-upxq3n0dw&amp;amp;cad=rja"&gt;download from here&lt;/a&gt;.
Sensed duplicate entry of system.web.extension section group? Yes, don't include the following section group in the config section if your site runs on asp.net 2.0 but published on asp.net 3.5/4.0.
&lt;br /&gt;
&lt;pre class="xhtml" name="code"&gt;    
&lt;configsections&gt;
    &lt;sectiongroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
      &lt;sectiongroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
        &lt;section allowdefinition="MachineToApplication" name="scriptResourceHandler" requirepermission="false" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
        &lt;sectiongroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
          &lt;section allowdefinition="Everywhere" name="jsonSerialization" requirepermission="false" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
          &lt;section allowdefinition="MachineToApplication" name="profileService" requirepermission="false" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
          &lt;section allowdefinition="MachineToApplication" name="authenticationService" requirepermission="false" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
                                   &lt;/section&gt;
                              &lt;/section&gt;
                         &lt;/section&gt;
                    &lt;/sectiongroup&gt;
               &lt;/section&gt;
           &lt;/sectiongroup&gt;
       &lt;/sectiongroup&gt;
&lt;/configsections&gt;&lt;/pre&gt;
Comment out the config section (or remove it if you like), and you are done.
Good luck!
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2011%2f09%2flast-time-i-got-following-error-http.html"&gt;&lt;img src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2011%252f09%252flast-time-i-got-following-error-http.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/dHu9IXxdDZo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/dHu9IXxdDZo/last-time-i-got-following-error-http.html</link><author>noreply@blogger.com (Sangam Uprety)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-CH1_Uuya6bs/Tns9ERg0IAI/AAAAAAAAAI8/VZpVi4POpIE/s72-c/duplicate-system.web.extensions-requested-page-cannot-be-accessed.jpg" height="72" width="72" /><thr:total>12</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/09/last-time-i-got-following-error-http.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-490032171265700827</guid><pubDate>Fri, 16 Sep 2011 05:58:00 +0000</pubDate><atom:updated>2011-11-07T13:32:14.742+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">CSS</category><title>How to add favicon in your asp-net site?</title><description>Make your site impressive and standard by displaying favicon. This is a practice of branding also. See in the following image the red circled area at the top corner. The black filled square is the favicon of &lt;a href="http://dotnetspidor.blogspot.com"&gt;dotnetspidor: A dot net programming blog&lt;/a&gt;. You can see the favicons in almost all of the popular websites.
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-HkqJc99hkJU/TnLlZsA6sGI/AAAAAAAAAIk/apXB-BeHFU0/s1600/add-favicon-in-asp.net-site-make-site-handsome.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="185" width="400" src="http://1.bp.blogspot.com/-HkqJc99hkJU/TnLlZsA6sGI/AAAAAAAAAIk/apXB-BeHFU0/s400/add-favicon-in-asp.net-site-make-site-handsome.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
So how to achieve this?
First create a favicon image of your own. Visualize a great logo/image for the favicon. Save it as favicon.ico. Drop it at the root folder of your site. Now you are one step away - just put the following two links just below the title of header of your form. If you are using master page, just put these lines in the master page and you are done for all the pages.

&lt;pre class="html" name="code"&gt;
&lt;head id="Head1" runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;link id="Link1" runat="server" rel="shortcut icon" href=favicon.ico type="image/x-icon" //&gt;
    &lt;link id="Link2" runat="server" rel="icon" href="favicon.ico" type="image/ico" //&gt;    
&lt;/head&gt;
&lt;/pre&gt;
So why the two lines? Normally the first link works. But for some tricky and picky browsers the second link will work. All the best!
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2011%2f09%2fmake-your-site-impressive-and-standard.html"&gt;&lt;img src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2011%252f09%252fmake-your-site-impressive-and-standard.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/gwSDHqoqgF4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/gwSDHqoqgF4/make-your-site-impressive-and-standard.html</link><author>noreply@blogger.com (Sangam Uprety)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-HkqJc99hkJU/TnLlZsA6sGI/AAAAAAAAAIk/apXB-BeHFU0/s72-c/add-favicon-in-asp.net-site-make-site-handsome.jpg" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/09/make-your-site-impressive-and-standard.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-4477698986625552499</guid><pubDate>Sat, 03 Sep 2011 09:45:00 +0000</pubDate><atom:updated>2011-09-22T19:40:33.843+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server 2005</category><title>Delete all stored procedures of a database in sql server</title><description>Sometimes there arises the need of deleting all stored procedures of a database. I came across the same situation when I was generating CRUD operations stored procedures via third party tool. I once changed a table and then had to regenerate all the stored procedures. So went on to find out the way. And ultimately stumbled at http://ctrlf5.net/?p=164.

Here is how to delete all the stored procedures of a sql server database:

&lt;pre class="sql" name="code"&gt;
USE myDBName
GO
DECLARE @procedureName varchar(500)
DECLARE cur CURSOR
      FOR SELECT [name] FROM sys.objects WHERE type = 'p'
      OPEN cur

      FETCH NEXT FROM cur INTO @procedureName
      WHILE @@fetch_status = 0
      BEGIN
            EXEC('DROP PROCEDURE ' + @procedureName)
            FETCH NEXT FROM cur INTO @procedureName
      END
      CLOSE cur
      DEALLOCATE cur
&lt;/pre&gt;

All the best!
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2011%2f09%2fdelete-all-stored-procedures-of.html"&gt;&lt;img src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2011%252f09%252fdelete-all-stored-procedures-of.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/wmh66G9LiTQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/wmh66G9LiTQ/delete-all-stored-procedures-of.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/09/delete-all-stored-procedures-of.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-5315076182965356097</guid><pubDate>Thu, 11 Aug 2011 07:05:00 +0000</pubDate><atom:updated>2011-08-11T12:42:47.964+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Frequent question on parent and child page refresh, reload, function call in asp-net using javascript</title><description>There are ways to call client functions in a parent &lt;a href="http://asp.net"&gt;asp.net&lt;/a&gt; web page from the child window. This is very helpful in many ways:&lt;br /&gt;
1. You can refresh parent page after some updates from child pager&lt;br /&gt;
2. You can partially change parts of the parent page&lt;br /&gt;
3. You can control the behaviour of parent page from its child (even from iframe child page)&lt;br /&gt;
&lt;br /&gt;
Example? See the way you edit a section in your blogger blog site. When you are logged in and browsing your blog, blogger lets you edit sections of your blog page directly from the public page of your blog. When you click the edit icon, a window will pop up and load with the setting of the editable section. Now when you save your changes the pop up window will close itself and the parent page (your public page) will be refreshed. Want to implement the same?&lt;br /&gt;
&lt;br /&gt;
You can follow these steps:&lt;br /&gt;
1. Program your parent page to open new window : You can place a hyperlink in your parent page. There are other &lt;a href="http://dotnetspidor.blogspot.com/2009/01/open-new-window-in-aspnet-web-page_28.html"&gt;several ways to open new window in asp.net web page&lt;/a&gt;.&lt;br /&gt;
2. Call client function in parent page : Now you can call client function in parent page from the child page. I have already posted &lt;a href="http://dotnetspidor.blogspot.com/2011/07/refresh-parent-page-from-child-window.html"&gt;how to call javascript function in parent web page from child page&lt;/a&gt;.&lt;br /&gt;
3. Sometimes your child page is a page loaded in iframe from your parent page. In that case it will be a bit different than what I have mentioned in (2). Learn &lt;a href="http://dotnetspidor.blogspot.com/2011/07/refresh-parent-page-partially-from.html"&gt;how to refresh parent parent from iframe child page&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I hope this will help tackle the mostly asked questions on parent and child page programming in &lt;a href="http://asp.net"&gt;asp.net&lt;/a&gt; using javascript.&lt;br /&gt;
&lt;br /&gt;
Happy programming!&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2011%2f08%2ffrequent-question-on-parent-and-child.html"&gt;&lt;img src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2011%252f08%252ffrequent-question-on-parent-and-child.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/jyYZK916d5w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/jyYZK916d5w/frequent-question-on-parent-and-child.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/08/frequent-question-on-parent-and-child.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-4279446810257854208</guid><pubDate>Tue, 19 Jul 2011 07:44:00 +0000</pubDate><atom:updated>2011-08-11T19:08:34.993+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Refresh parent page partially from iframe without reloading the iframe using javascript in asp.net</title><description>Last time we talked about &lt;a href="http://dotnetspidor.blogspot.com/2011/07/refresh-parent-page-from-child-window.html"&gt;Refreshing the parent page from child window in asp.net using javascript&lt;/a&gt;. This technique is useful in many scenarios. (If you haven't been through &lt;a href="http://dotnetspidor.blogspot.com/2009/01/open-new-window-in-aspnet-web-page_28.html"&gt;How to open new window in asp.net using javscript and C-sharp&lt;/a&gt;, I would like to suggest to read the post thoroughly. After this you will clearly see why the stuff we are talking about in this post is important.) But programmers using iframe to load another asp.net web page may wonder if we could only partially refresh the parent page so that iframe keeps itself from reloading. This can by done by calling the parent page javascript function from the child page loaded in the iframe. This way we can even avoid the need of ajax to refresh the parent page without affecting the iframe content. As usual I have presented the simple practical approach to tell you as much clearly as possible - follow please. And before continuing, I would like to inform that there is a post regarding &lt;a href="http://dotnetspidor.blogspot.com/2011/08/frequent-question-on-parent-and-child.html"&gt;Frequent question on parent and child page refresh, reload, function call in asp-net using javascript&lt;/a&gt; that discusses, in aggregate, about some more approaches of parent and child page operations.&lt;br /&gt;
&lt;b&gt;Parent Asp.net Page&lt;/b&gt;&lt;br /&gt;
&lt;pre class="html" name="code"&gt;&lt;form id="form1" runat="server"&gt;&lt;div style="width: 600px;"&gt;&lt;div style="font-weight: bold;"&gt;I am the parent page.&lt;/div&gt;&lt;div id="divChildMessage" style="float: left; width: 290px;"&gt;&lt;/div&gt;&lt;div style="float: right;"&gt;&lt;iframe src="Iframe.aspx" height="200px" width="300px"&gt;&lt;/iframe&gt;
        &lt;/div&gt;&lt;div style="float: none;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/form&gt;&lt;script src="../jquery-1.4.4.min.js" type="text/javascript"&gt;
&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        function displayMessageFromIframeChild(msg)
        {
            $('#divChildMessage').append(msg+'
');
        }
    
&lt;/script&gt;
&lt;/pre&gt;&lt;b&gt;Page to be loaded in parent page iframe&lt;/b&gt;&lt;br /&gt;
&lt;pre class="csharp" name="code"&gt;&lt;form id="form1" runat="server"&gt;&lt;div&gt;I am content of iframe page.
&lt;input id="btnCallParent" type="button" value="Refresh Parent Partially" /&gt;
    &lt;/div&gt;&lt;/form&gt;&lt;script src="../jquery-1.4.4.min.js" type="text/javascript"&gt;
&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        $('#btnCallParent').click(function(){
            var d=new Date();
            window.parent.displayMessageFromIframeChild('I am your iframe child calling on 
'+d.toString()+"&lt;hr/&gt;");
        });
    
&lt;/script&gt;
&lt;/pre&gt;&lt;b&gt;Visualize the output&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/-HIQG5upr2qc/TiU1b9_6vDI/AAAAAAAAAIc/MpgMm1XTMVM/s1600/refresh-parent-page-partially-without-reloading-child-iframe-page-with-javascript-in-asp-net.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Image: refresh parent page partially from iframe without reloading the iframe using javascript in asp.net" border="0" height="246" src="http://1.bp.blogspot.com/-HIQG5upr2qc/TiU1b9_6vDI/AAAAAAAAAIc/MpgMm1XTMVM/s400/refresh-parent-page-partially-without-reloading-child-iframe-page-with-javascript-in-asp-net.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;What's in the code?&lt;/b&gt;&lt;br /&gt;
You see a button in the child page that is loaded in the iframe of parent page. On click of the button, the javascript function displayMessageFromIframeChild() of the parent page is called. This function displays the string message from child page in a div of the parent page. That's all. Happy programming!&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2011%2f07%2frefresh-parent-page-partially-from.html"&gt;&lt;img alt="kick it on DotNetKicks.com" border="0" src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2011%252f07%252frefresh-parent-page-partially-from.html" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/oPLT-dEngjI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/oPLT-dEngjI/refresh-parent-page-partially-from.html</link><author>noreply@blogger.com (Sangam Uprety)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-HIQG5upr2qc/TiU1b9_6vDI/AAAAAAAAAIc/MpgMm1XTMVM/s72-c/refresh-parent-page-partially-without-reloading-child-iframe-page-with-javascript-in-asp-net.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/07/refresh-parent-page-partially-from.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-1159833004301920364</guid><pubDate>Thu, 14 Jul 2011 12:55:00 +0000</pubDate><atom:updated>2011-08-11T19:09:08.444+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Refresh parent page from child window using javascript in asp.net web application</title><description>Much often we &lt;a href="http://dotnetspidor.blogspot.com/2009/01/open-new-window-in-aspnet-web-page_28.html"&gt;open child windows from parent web page&lt;/a&gt;. In the child page we perform some activities, and later close the window. At the very time we may need to refresh the parent page so that changes made in the child window be reflected in the parent window. We can easily accomplish this using javascript in asp.net web page. Let me show the way using code snippets. If it is your iframe page, you still can &lt;a href="http://dotnetspidor.blogspot.com/2011/07/refresh-parent-page-partially-from.html"&gt;refresh the parent page partially from page in iframe&lt;/a&gt; (because this will avoid reloading the iframe itself), which I have discussed in &lt;a href="http://dotnetspidor.blogspot.com/2011/07/refresh-parent-page-partially-from.html"&gt;another &lt;/a&gt;post. And right before following, I would like to inform that there is a post regarding &lt;a href="http://dotnetspidor.blogspot.com/2011/08/frequent-question-on-parent-and-child.html"&gt;Frequent question on parent and child page refresh, reload, function call in asp-net using javascript&lt;/a&gt; that discusses, in aggregate, about some more approaches of parent and child page operations.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Parent asp.net web page&lt;/b&gt;&lt;br /&gt;
&lt;pre name="code" class="html"&gt;&lt;form id="form1" runat="server"&gt;&lt;div&gt;&lt;asp:HyperLink ID="hlink1" runat="server" NavigateUrl="Child.aspx" 
        Target="_blank"&gt;Open child window&lt;/asp:HyperLink&gt;        
    &lt;/div&gt;&lt;/form&gt;&lt;/pre&gt;This is the parent page. Clicking the link will open the child page Child.aspx in a new window. If you wish you can &lt;a href="http://dotnetspidor.blogspot.com/2009/01/open-new-window-in-aspnet-web-page_28.html"&gt;Open the new window in asp.net web page in different ways&lt;/a&gt;, which I have already discussed in a previous post.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Child asp.net web page&lt;/b&gt;&lt;br /&gt;
&lt;pre name="code" class="html"&gt;&lt;form id="form1" runat="server"&gt;&lt;div&gt;&lt;p&gt;This is the child page.&lt;/p&gt;&lt;asp:Button ID="btnOk" runat="server" OnClick="btnOk_Click" Text="OK" /&gt;        
    &lt;/div&gt;&lt;/form&gt;&lt;/pre&gt;&lt;pre name="code" class="c-sharp"&gt;protected void btnOk_Click(object sender, EventArgs e)
    { 
        //Implement Your logic here.....
        //..............................
        //now refresh parent page and close this window
        string script = "this.window.opener.location=this.window.opener.location;this.window.close();";
        if (!ClientScript.IsClientScriptBlockRegistered("REFRESH_PARENT"))
            ClientScript.RegisterClientScriptBlock(typeof(string), "REFRESH_PARENT", script, true);        
    }
&lt;/pre&gt;In the child page, I have just put a button. When the button is clicked, the page logic will be implemented (which I have indicated by the comment lines in the event handler of the button in the asp.net child page).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The asp.net plus javascript logic&lt;/b&gt;&lt;br /&gt;
I have just created the javascript stuff that refreshes the parent page of this child page; see the lines:&lt;br /&gt;
this.window.opener.location=this.window.opener.location;this.window.close();&lt;br /&gt;
This line replaces the url of the parent page with its own url - that causes the parent page to reload. And yes, I have registered the javascript code block with ClientScript so that it is executed when the postback life cycle of this child page completes.&lt;br /&gt;
&lt;br /&gt;
Happy programming!&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetspidor.blogspot.com%2f2011%2f07%2frefresh-parent-page-from-child-window.html"&gt;&lt;img src="http%3A%2F%2Fwww.dotnetkicks.com%2FServices%2FImages%2FKickItImageGenerator.ashx%3Furl%3Dhttp%253a%252f%252fdotnetspidor.blogspot.com%252f2011%252f07%252frefresh-parent-page-from-child-window.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/5l0mCU8fioQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/5l0mCU8fioQ/refresh-parent-page-from-child-window.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>11</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/07/refresh-parent-page-from-child-window.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-5887735518338878952</guid><pubDate>Mon, 11 Jul 2011 10:09:00 +0000</pubDate><atom:updated>2011-07-11T15:41:34.300+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><title>C# - Copy files and folders recursively from source to destination folder in c-sharp</title><description>In C#, there is no built in function to recursively bulk-copy all files and folders from source to destination folder. So this has to be done manually by the programmer. Being a lover of reusability feature of object oriented programming, I googled and stumbled on the code snippet below:&lt;br /&gt;
&lt;pre name="code" class="csharp"&gt;/// &lt;summary&gt;
    /// Copy folder to another folder recursively
    /// &lt;/summary&gt;
    /// &lt;param name="sourceFolder"&gt;&lt;/param&gt;/// &lt;param name="destFolder"&gt;&lt;/param&gt;public static void CopyFolder(string sourceFolder, string destFolder)
    {
        if (!Directory.Exists(destFolder))
            Directory.CreateDirectory(destFolder);
        string[] files = Directory.GetFiles(sourceFolder);
        foreach (string file in files)
        {
            string name = Path.GetFileName(file);
            string dest = Path.Combine(destFolder, name);
            File.Copy(file, dest);
        }
        string[] folders = Directory.GetDirectories(sourceFolder);
        foreach (string folder in folders)
        {
            string name = Path.GetFileName(folder);
            string dest = Path.Combine(destFolder, name);
            CopyFolder(folder, dest);
        }
    }
&lt;/pre&gt;Note that all files at the source folder have been copied to the destination folder. But folder and files within them have been copied using recursion - see the function of second foreach construct.&lt;br /&gt;
&lt;br /&gt;
Shortcomings? Yes, no exception handling has been done in the snippet. However, the functionality is ok! Thanks to &lt;a href="http://www.csharp411.com/c-copy-folder-recursively/"&gt;csharp411.com&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/84k-R9Gy3go" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/84k-R9Gy3go/c-copy-files-and-folders-recursively.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>2</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/07/c-copy-files-and-folders-recursively.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6104185749662767834.post-6113445646576085479</guid><pubDate>Sat, 18 Jun 2011 08:27:00 +0000</pubDate><atom:updated>2011-08-11T12:37:24.597+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET Control</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Page is null at the c# class library control</title><description>Hi all.&lt;br /&gt;
Just caught up in the mess when I came to see : the parent page of one of my class library control was null at runtime. That means the call:&lt;br /&gt;
Page.ClientScript.GetWebResourceUrl([control-type],[full-resource-url]); &lt;br /&gt;
would fail.&lt;br /&gt;
&lt;br /&gt;
I have been suggested &lt;b&gt;this happens when my parent page is being rendered within an iframe&lt;/b&gt;. But this was &lt;b&gt;not the case for now&lt;/b&gt;. I was just using a placeholder to dynamically add the control. So what&amp;#39;s the solution?&lt;br /&gt;
&lt;br /&gt;
Yes it came around after some googling, try this:&lt;br /&gt;
&lt;br /&gt;
(Page)HttpContext.Current.Handler).ClientScript.GetWebResourceUrl([control-type],[full-resource-url]); &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What&amp;#39;s in here?&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
The Page that refers to the Page control containing this dynamic control is achieved through current request handler. This avoids the problem since the request was generated by the page. But mere Page or this.Page or this.Parent.Page or whatsoever might have been missed due to the hierarchy of the controls or &lt;b&gt;is it due to anything else?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this helps. Sweet programming!&lt;br /&gt;
&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;For full article, tips and utilities, visit http://www.dotnetspidor.blogspot.com&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dotnetspidor/~4/UQGGOCUW3U4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/dotnetspidor/~3/UQGGOCUW3U4/page-is-null-at-c-class-library-control.html</link><author>noreply@blogger.com (Sangam Uprety)</author><thr:total>0</thr:total><feedburner:origLink>http://dotnetspidor.blogspot.com/2011/06/page-is-null-at-c-class-library-control.html</feedburner:origLink></item></channel></rss>
