<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 22:33:30 +0000</lastBuildDate>
    <item>
      <title>(ASP) How to send SMS using ASP.NET through HTTP - Gupta86</title>
      <link>https://snipplr.com/view/89414/how-to-send-sms-using-aspnet-through-http</link>
      <description>&lt;p&gt;Hello Guys,&#13;
&#13;
This short ASP.NET code snippet is intended to provide you a brief review on how to add SMS functionality to your website. You will see, this is a very simple but smart solution. This ASP.NET application is able to send messages by using HTTP requests towards the SMS gateway that sends the SMSs to the destination telephone via a GSM modem or an IP SMS connection.&#13;
&#13;
Letâ€™s take a quick look at the software requirements that are essentially needed for tjis solution. In order to send SMS messages from your ASP.NET application, you need a development platform, e.b Visual Studio, of course, .NET Framework 4.0, Internet Information Services (IIS) and an SMS gateway (I used Ozeki NG â€“ http://www.ozekisms.com). You also need a GSM modem attached to your PC or an IP SMS connection to be able to send messages.&#13;
&#13;
Okay ans now letâ€™s use the code snippet! Copy the content of smssend.aspx and smssend.aspx.cs into the main directory of the IIS server - C:\Inetpub\wwwroot\ directory (). Configure the fixed data in the smssend.aspx.cs file (the IP address and port number of the SMS gateway, username, password). Launch your SMS gateway Server. Start a web browser and enter this URL: http://127.0.0.1/smssend.aspx - where 127.0.0.1 means that the smssend.aspx and smssend.aspx.cs files can be found on the same computer on which the browser has been opened). Fill in the required fields, and then click the Send button. Itâ€™s as easy as that!&#13;
&#13;
Happy coding! :)&lt;/p&gt;</description>
      <pubDate>Wed, 04 Feb 2015 21:59:08 UTC</pubDate>
      <guid>https://snipplr.com/view/89414/how-to-send-sms-using-aspnet-through-http</guid>
    </item>
    <item>
      <title>(ASP) ASP.net Dropdown U.S States (non-abbreviated) - windmarble</title>
      <link>https://snipplr.com/view/78413/aspnet-dropdown-us-states-nonabbreviated</link>
      <description>&lt;p&gt;To select a US State from a form.&lt;/p&gt;</description>
      <pubDate>Fri, 26 Sep 2014 22:50:02 UTC</pubDate>
      <guid>https://snipplr.com/view/78413/aspnet-dropdown-us-states-nonabbreviated</guid>
    </item>
    <item>
      <title>(C#) C#/.NET  Code Samples to Save Microsoft OneNote (.one) file as an image (.PNG, .BMP, .JPEG, .GIF) file - johansonkatherine</title>
      <link>https://snipplr.com/view/73837/cnet--code-samples-to-save-microsoft-onenote-one-file-as-an-image-png-bmp-jpeg-gif-file</link>
      <description>&lt;p&gt;The Aspose.Note for .NET API allows developers to open files &amp; manipulate elements of OneNote books &amp; export them to PNG, GIF, JPEG, BMP and PDF formats. The following code sample shows developers how to save OneNote File as an image in C#/.NET&lt;/p&gt;</description>
      <pubDate>Tue, 11 Mar 2014 20:54:07 UTC</pubDate>
      <guid>https://snipplr.com/view/73837/cnet--code-samples-to-save-microsoft-onenote-one-file-as-an-image-png-bmp-jpeg-gif-file</guid>
    </item>
    <item>
      <title>(C#) Data Table Bible - thetwai</title>
      <link>https://snipplr.com/view/73071/data-table-bible</link>
      <description>&lt;p&gt;http://www.dotnetfunda.com/articles/show/131/datatable-adding-modifying-deleting-filtering-sorting-rows-readingwrit&lt;/p&gt;</description>
      <pubDate>Tue, 03 Dec 2013 03:20:04 UTC</pubDate>
      <guid>https://snipplr.com/view/73071/data-table-bible</guid>
    </item>
    <item>
      <title>(ASP) Call javascript function on onClientClick method with parameters - keidash</title>
      <link>https://snipplr.com/view/72351/call-javascript-function-on-onclientclick-method-with-parameters</link>
      <description>&lt;p&gt;For example, in a button, in OnClientClick method, pass parameters for a javascript method.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Sep 2013 20:57:29 UTC</pubDate>
      <guid>https://snipplr.com/view/72351/call-javascript-function-on-onclientclick-method-with-parameters</guid>
    </item>
    <item>
      <title>(JavaScript) Globalize jQuery Validate for ASP.Net MVC 4 - SnipplrSlush</title>
      <link>https://snipplr.com/view/71704/globalize-jquery-validate-for-aspnet-mvc-4</link>
      <description>&lt;p&gt;jQuery Validate is used in ASP.Net MVC 4. As it is checking only en-US as a default you may have problems with different cultures for decimal inputs and dates (I had to try for minutes to find a accepted date format. I don't want to see how my customers would react). The decimal has been converted from the accepted 9.90 to 990,00 by the controller.&lt;/p&gt;</description>
      <pubDate>Wed, 03 Jul 2013 18:07:58 UTC</pubDate>
      <guid>https://snipplr.com/view/71704/globalize-jquery-validate-for-aspnet-mvc-4</guid>
    </item>
    <item>
      <title>(C#) different class for alternating item - samilce</title>
      <link>https://snipplr.com/view/70055/different-class-for-alternating-item</link>
      <description>&lt;p&gt;To use a different class for alternating item of asp.net repeater control&lt;/p&gt;</description>
      <pubDate>Fri, 22 Feb 2013 19:06:47 UTC</pubDate>
      <guid>https://snipplr.com/view/70055/different-class-for-alternating-item</guid>
    </item>
    <item>
      <title>(C#) Access a Method in a Master Page with Code-Behind - kfiil</title>
      <link>https://snipplr.com/view/66303/access-a-method-in-a-master-page-with-codebehind</link>
      <description>&lt;p&gt;Access a Method in a Master Page with Code-Behind&lt;/p&gt;</description>
      <pubDate>Tue, 24 Jul 2012 17:01:59 UTC</pubDate>
      <guid>https://snipplr.com/view/66303/access-a-method-in-a-master-page-with-codebehind</guid>
    </item>
    <item>
      <title>(jQuery) jQuery and Clicking an ASP.NET Linkbutton - weldonr30</title>
      <link>https://snipplr.com/view/65766/jquery-and-clicking-an-aspnet-linkbutton</link>
      <description>&lt;p&gt;This is a pretty standard jQuery method to listen for the enter key and simply "click" the button.  However, if you are using a LinkButton this code will not work.  The reason for this is that a LinkButton is rendered to the browser as an Anchor tag with a href property that contains a javascript action to trigger the postback.  Click does nothing on the button as there is nothing for it to complete.&lt;/p&gt;</description>
      <pubDate>Sat, 23 Jun 2012 01:30:15 UTC</pubDate>
      <guid>https://snipplr.com/view/65766/jquery-and-clicking-an-aspnet-linkbutton</guid>
    </item>
    <item>
      <title>(C#) Dropdown list ASP.NET MVC - praveensewak</title>
      <link>https://snipplr.com/view/65285/dropdown-list-aspnet-mvc</link>
      <description>&lt;p&gt;Dropdown list bound in MVC using Entity Framework&lt;/p&gt;</description>
      <pubDate>Thu, 31 May 2012 09:04:37 UTC</pubDate>
      <guid>https://snipplr.com/view/65285/dropdown-list-aspnet-mvc</guid>
    </item>
    <item>
      <title>(C#) IsPageRefresh in ASP .NET - Preventing previously submitted - satie83</title>
      <link>https://snipplr.com/view/64908/ispagerefresh-in-asp-net--preventing-previously-submitted</link>
      <description>&lt;p&gt;How do I prevent previously submitted form data from being reinserted into the database when the user presses the browser's Refresh button?&#13;
Although it is not possible due to unique key constraint available in tables but it is unnecessary go to other layer (data access, business layer).&lt;/p&gt;</description>
      <pubDate>Thu, 17 May 2012 22:35:19 UTC</pubDate>
      <guid>https://snipplr.com/view/64908/ispagerefresh-in-asp-net--preventing-previously-submitted</guid>
    </item>
    <item>
      <title>(VB.NET) Dynamic  CSS  file in header - kzelda</title>
      <link>https://snipplr.com/view/64477/dynamic--css--file-in-header</link>
      <description>&lt;p&gt;Dynamic  Add css file in header&lt;/p&gt;</description>
      <pubDate>Tue, 10 Apr 2012 17:02:55 UTC</pubDate>
      <guid>https://snipplr.com/view/64477/dynamic--css--file-in-header</guid>
    </item>
    <item>
      <title>(JavaScript) JQuery popup new window from ASP.NET page - Krummelz</title>
      <link>https://snipplr.com/view/60600/jquery-popup-new-window-from-aspnet-page</link>
      <description>&lt;p&gt;This can be put into a utility class in your ASP.NET project and put onto the page with ScriptManager.RegisterStartupScript(). The script alters the ASP.NET __VIEWSTATE value which somehow validates requests; if you leave it out the popup wont work.&lt;/p&gt;</description>
      <pubDate>Mon, 07 Nov 2011 17:55:47 UTC</pubDate>
      <guid>https://snipplr.com/view/60600/jquery-popup-new-window-from-aspnet-page</guid>
    </item>
    <item>
      <title>(JavaScript) Resolve relative Urls from Javascript (for ASP.NET) - plugables</title>
      <link>https://snipplr.com/view/58558/resolve-relative-urls-from-javascript-for-aspnet</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 09 Sep 2011 20:14:38 UTC</pubDate>
      <guid>https://snipplr.com/view/58558/resolve-relative-urls-from-javascript-for-aspnet</guid>
    </item>
    <item>
      <title>(C#) static ResolveUrl  and ResolveServerUrl - plugables</title>
      <link>https://snipplr.com/view/58557/static-resolveurl--and-resolveserverurl</link>
      <description>&lt;p&gt;You do not have Page object available everywhere to use Page.ResolveUrl. Here is an alternate.&lt;/p&gt;</description>
      <pubDate>Fri, 09 Sep 2011 20:11:09 UTC</pubDate>
      <guid>https://snipplr.com/view/58557/static-resolveurl--and-resolveserverurl</guid>
    </item>
    <item>
      <title>(C#) Sending different Email types  with ASP.Net - derebus</title>
      <link>https://snipplr.com/view/57068/sending-different-email-types--with-aspnet</link>
      <description>&lt;p&gt;Como insertar imgenes en un envio via email en ASP.NET&lt;/p&gt;</description>
      <pubDate>Sat, 23 Jul 2011 09:29:25 UTC</pubDate>
      <guid>https://snipplr.com/view/57068/sending-different-email-types--with-aspnet</guid>
    </item>
    <item>
      <title>(VB.NET) Saving data from gridview to xml file - tabook22</title>
      <link>https://snipplr.com/view/56388/saving-data-from-gridview-to-xml-file</link>
      <description>&lt;p&gt;this code will show you how to save data from gridview to xml file&lt;/p&gt;</description>
      <pubDate>Mon, 11 Jul 2011 06:52:06 UTC</pubDate>
      <guid>https://snipplr.com/view/56388/saving-data-from-gridview-to-xml-file</guid>
    </item>
    <item>
      <title>(VB.NET) create a new datatable - tabook22</title>
      <link>https://snipplr.com/view/56386/create-a-new-datatable</link>
      <description>&lt;p&gt;This code will sow you how to create a new datatable&lt;/p&gt;</description>
      <pubDate>Mon, 11 Jul 2011 06:47:38 UTC</pubDate>
      <guid>https://snipplr.com/view/56386/create-a-new-datatable</guid>
    </item>
    <item>
      <title>(VB.NET) Create a new xml file and display it in browser - tabook22</title>
      <link>https://snipplr.com/view/56385/create-a-new-xml-file-and-display-it-in-browser</link>
      <description>&lt;p&gt;Create a new xml file and display it in browser&lt;/p&gt;</description>
      <pubDate>Mon, 11 Jul 2011 06:46:17 UTC</pubDate>
      <guid>https://snipplr.com/view/56385/create-a-new-xml-file-and-display-it-in-browser</guid>
    </item>
    <item>
      <title>(VB.NET) Binding xml file to Gridview - tabook22</title>
      <link>https://snipplr.com/view/56384/binding-xml-file-to-gridview</link>
      <description>&lt;p&gt;This code will be used to bind an xml file to gridview&lt;/p&gt;</description>
      <pubDate>Mon, 11 Jul 2011 06:44:39 UTC</pubDate>
      <guid>https://snipplr.com/view/56384/binding-xml-file-to-gridview</guid>
    </item>
    <item>
      <title>(VB.NET) add data to an existing xml file - tabook22</title>
      <link>https://snipplr.com/view/56383/add-data-to-an-existing-xml-file</link>
      <description>&lt;p&gt;This code snippet is used to add data to an existing xml file&lt;/p&gt;</description>
      <pubDate>Mon, 11 Jul 2011 06:42:47 UTC</pubDate>
      <guid>https://snipplr.com/view/56383/add-data-to-an-existing-xml-file</guid>
    </item>
    <item>
      <title>(VB.NET) How to Print in ASP.NET 2.0 - derebus</title>
      <link>https://snipplr.com/view/54466/how-to-print-in-aspnet-20</link>
      <description>&lt;p&gt;how to print controls in ASP.NET 2.0 using both server side code and javascript.&lt;/p&gt;</description>
      <pubDate>Fri, 27 May 2011 07:38:46 UTC</pubDate>
      <guid>https://snipplr.com/view/54466/how-to-print-in-aspnet-20</guid>
    </item>
    <item>
      <title>(VB.NET) How To Create A Remember Me Cookie - derebus</title>
      <link>https://snipplr.com/view/53478/how-to-create-a-remember-me-cookie</link>
      <description>&lt;p&gt;How To Create A Remember Me Cookie&lt;/p&gt;</description>
      <pubDate>Fri, 13 May 2011 01:40:21 UTC</pubDate>
      <guid>https://snipplr.com/view/53478/how-to-create-a-remember-me-cookie</guid>
    </item>
    <item>
      <title>(ASP) Exporting asp.net treeview data control - kashif21</title>
      <link>https://snipplr.com/view/53249/exporting-aspnet-treeview-data-control</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 09 May 2011 22:58:49 UTC</pubDate>
      <guid>https://snipplr.com/view/53249/exporting-aspnet-treeview-data-control</guid>
    </item>
    <item>
      <title>(C#) Get the Host Name in ASP.NET C# - jasonseney</title>
      <link>https://snipplr.com/view/50795/get-the-host-name-in-aspnet-c</link>
      <description>&lt;p&gt;Will return the host name that the site is running on. Example:&#13;
&#13;
`http://mysite.com` or `http://myspecialsite.com:102`&lt;/p&gt;</description>
      <pubDate>Fri, 18 Mar 2011 07:33:58 UTC</pubDate>
      <guid>https://snipplr.com/view/50795/get-the-host-name-in-aspnet-c</guid>
    </item>
    <item>
      <title>(C#) Null check for razor in line text display - AndewAllison</title>
      <link>https://snipplr.com/view/50333/null-check-for-razor-in-line-text-display</link>
      <description>&lt;p&gt;This is far from ground breaking but I forget it all the time so thought this might be a useful place to keep a reference of it&lt;/p&gt;</description>
      <pubDate>Wed, 09 Mar 2011 04:22:05 UTC</pubDate>
      <guid>https://snipplr.com/view/50333/null-check-for-razor-in-line-text-display</guid>
    </item>
    <item>
      <title>(ASP) ASP.NET Repeater - mbbrennan</title>
      <link>https://snipplr.com/view/47025/aspnet-repeater</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 04:36:03 UTC</pubDate>
      <guid>https://snipplr.com/view/47025/aspnet-repeater</guid>
    </item>
    <item>
      <title>(C#) ASP.NET Image Upload and Resize - vedgiee</title>
      <link>https://snipplr.com/view/43917/aspnet-image-upload-and-resize</link>
      <description>&lt;p&gt;Image Upload and Resize&lt;/p&gt;</description>
      <pubDate>Thu, 11 Nov 2010 05:13:03 UTC</pubDate>
      <guid>https://snipplr.com/view/43917/aspnet-image-upload-and-resize</guid>
    </item>
    <item>
      <title>(C#) Server-side Cookie Helper Methods - mecha</title>
      <link>https://snipplr.com/view/43108/serverside-cookie-helper-methods</link>
      <description>&lt;p&gt;You should include these Cookie helpers in your base page class. Enjoy!&lt;/p&gt;</description>
      <pubDate>Thu, 28 Oct 2010 08:52:31 UTC</pubDate>
      <guid>https://snipplr.com/view/43108/serverside-cookie-helper-methods</guid>
    </item>
    <item>
      <title>(XML) system.net changes for more concurrent webservice calls - oazabir</title>
      <link>https://snipplr.com/view/42956/systemnet-changes-for-more-concurrent-webservice-calls</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 26 Oct 2010 08:20:36 UTC</pubDate>
      <guid>https://snipplr.com/view/42956/systemnet-changes-for-more-concurrent-webservice-calls</guid>
    </item>
    <item>
      <title>(XML) ASP.NET ProcessModel for better thruput - oazabir</title>
      <link>https://snipplr.com/view/42955/aspnet-processmodel-for-better-thruput</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 26 Oct 2010 08:18:27 UTC</pubDate>
      <guid>https://snipplr.com/view/42955/aspnet-processmodel-for-better-thruput</guid>
    </item>
    <item>
      <title>(VB.NET) Server-side Cookie Helper Methods - mecha</title>
      <link>https://snipplr.com/view/42742/serverside-cookie-helper-methods</link>
      <description>&lt;p&gt;You should include these Cookie helpers in your base page class.  Enjoy!&lt;/p&gt;</description>
      <pubDate>Fri, 22 Oct 2010 06:12:59 UTC</pubDate>
      <guid>https://snipplr.com/view/42742/serverside-cookie-helper-methods</guid>
    </item>
    <item>
      <title>(C#) create aspnet db in sql from .net tools - hairajeshk</title>
      <link>https://snipplr.com/view/42539/create-aspnet-db-in-sql-from-net-tools</link>
      <description>&lt;p&gt;create aspnet db in sql from .net tools&lt;/p&gt;</description>
      <pubDate>Tue, 19 Oct 2010 13:13:24 UTC</pubDate>
      <guid>https://snipplr.com/view/42539/create-aspnet-db-in-sql-from-net-tools</guid>
    </item>
    <item>
      <title>(Other) Integrate asp.net web app with sharepoint - hairajeshk</title>
      <link>https://snipplr.com/view/42487/integrate-aspnet-web-app-with-sharepoint</link>
      <description>&lt;p&gt;integrate asp.net with sharepoint (Sharepoint)&lt;/p&gt;</description>
      <pubDate>Mon, 18 Oct 2010 20:20:52 UTC</pubDate>
      <guid>https://snipplr.com/view/42487/integrate-aspnet-web-app-with-sharepoint</guid>
    </item>
    <item>
      <title>(C#) ASP.NET Query from codebehind (Old School) - myke</title>
      <link>https://snipplr.com/view/40435/aspnet-query-from-codebehind-old-school</link>
      <description>&lt;p&gt;Old school or simple way of querying data without a DAL.&lt;/p&gt;</description>
      <pubDate>Tue, 14 Sep 2010 02:16:39 UTC</pubDate>
      <guid>https://snipplr.com/view/40435/aspnet-query-from-codebehind-old-school</guid>
    </item>
    <item>
      <title>(C#) Shorten text class - Fogh</title>
      <link>https://snipplr.com/view/39651/shorten-text-class</link>
      <description>&lt;p&gt;Class to shorten text. For example for an article where people can click read more to read the whole article.&lt;/p&gt;</description>
      <pubDate>Sat, 28 Aug 2010 22:08:55 UTC</pubDate>
      <guid>https://snipplr.com/view/39651/shorten-text-class</guid>
    </item>
    <item>
      <title>(C#) Redirect to website without www. - Fogh</title>
      <link>https://snipplr.com/view/39650/redirect-to-website-without-www</link>
      <description>&lt;p&gt;Add this code to your Global.asax in your ASP.NET project, in the \"Application_BeginRequest\" event.&lt;/p&gt;</description>
      <pubDate>Sat, 28 Aug 2010 22:02:04 UTC</pubDate>
      <guid>https://snipplr.com/view/39650/redirect-to-website-without-www</guid>
    </item>
    <item>
      <title>(C#) ASP.NET URL RESOLVER - emmanuelbuah</title>
      <link>https://snipplr.com/view/38903/aspnet-url-resolver</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 11 Aug 2010 07:03:42 UTC</pubDate>
      <guid>https://snipplr.com/view/38903/aspnet-url-resolver</guid>
    </item>
    <item>
      <title>(C#) Sorting Gridview Control ASP.NET - mpcircuitry</title>
      <link>https://snipplr.com/view/36549/sorting-gridview-control-aspnet</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 01 Jul 2010 01:47:44 UTC</pubDate>
      <guid>https://snipplr.com/view/36549/sorting-gridview-control-aspnet</guid>
    </item>
    <item>
      <title>(C#) ASP.NET Membership Provider - Remove Unwanted Profile Properties - mmfusion</title>
      <link>https://snipplr.com/view/36547/aspnet-membership-provider--remove-unwanted-profile-properties</link>
      <description>&lt;p&gt;I removed several properties from my custom Profile class, and wanted to clean out the data from the aspnet\_Profile table. This code will remove all unwanted data from the PropertyNames and PropertyValuesString columns of aspnet\_Profile. Note this assumes PropertyValuesBinary is not used, though it wouldn't be hard to support that too.&lt;/p&gt;</description>
      <pubDate>Thu, 01 Jul 2010 00:15:48 UTC</pubDate>
      <guid>https://snipplr.com/view/36547/aspnet-membership-provider--remove-unwanted-profile-properties</guid>
    </item>
    <item>
      <title>(jQuery) Easy JQuery Asp.Net Control Selection - delikassap</title>
      <link>https://snipplr.com/view/34621/easy-jquery-aspnet-control-selection</link>
      <description>&lt;p&gt;// Taken from  :&#13;
// http://www.west-wind.com/weblog/posts/42319.aspx&lt;/p&gt;</description>
      <pubDate>Mon, 17 May 2010 07:21:01 UTC</pubDate>
      <guid>https://snipplr.com/view/34621/easy-jquery-aspnet-control-selection</guid>
    </item>
    <item>
      <title>(jQuery) [jQuery] Hookup events after UpdatePanel update - Calico182</title>
      <link>https://snipplr.com/view/32016/jquery-hookup-events-after-updatepanel-update</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 15 Apr 2010 09:28:51 UTC</pubDate>
      <guid>https://snipplr.com/view/32016/jquery-hookup-events-after-updatepanel-update</guid>
    </item>
    <item>
      <title>(C#) ASP.NET - Loop through the ListView Control. - the_menace</title>
      <link>https://snipplr.com/view/29056/aspnet--loop-through-the-listview-control</link>
      <description>&lt;p&gt;Loop through the ListView Control within 2nd level collection. 2nd level means it's within another control (ie table html generic control).&lt;/p&gt;</description>
      <pubDate>Mon, 01 Mar 2010 12:14:23 UTC</pubDate>
      <guid>https://snipplr.com/view/29056/aspnet--loop-through-the-listview-control</guid>
    </item>
    <item>
      <title>(JavaScript) Getting JavaScript and ASP.NET talking (outside of AJAX) - streamt</title>
      <link>https://snipplr.com/view/28310/getting-javascript-and-aspnet-talking-outside-of-ajax</link>
      <description>&lt;p&gt;Passing values between ASP.NET and JavaScript code is messy...&lt;/p&gt;</description>
      <pubDate>Sun, 14 Feb 2010 22:36:46 UTC</pubDate>
      <guid>https://snipplr.com/view/28310/getting-javascript-and-aspnet-talking-outside-of-ajax</guid>
    </item>
    <item>
      <title>(JavaScript) Accessing javascript variable from code behind and accessing code behind variable from javascript - streamt</title>
      <link>https://snipplr.com/view/28309/accessing-javascript-variable-from-code-behind-and-accessing-code-behind-variable-from-javascript</link>
      <description>&lt;p&gt;Many times we face situation like when we need to access the code behind variables from javascript as well as accessing javascript variable from code behind.&#13;
&#13;
I can remember a practical scenario in my previous project.&#13;
&#13;
The requirement was to draw a organizational chart (What is Org chart?). On mouse hover on each node of the chart a window should get opened and all the information about the particular employee should be shown there without sny kind of postback(not even partial).&#13;
&#13;
So here all you have to do is, you have to get all the required values from the server in to your code behind variable and then access them from your javascript code.&#13;
&#13;
How to access code behind variable value from javascript?&#13;
&#13;
Step 1:  Define the variable in your code behind.&#13;
&#13;
Step 2:Access the variable using the '&lt;%=&gt;' syntax.&#13;
&#13;
  public/protected string codeBehindVariable = "Hello World";// Step 1&#13;
&#13;
 var javascriptVar='&lt;%=&gt;';// Step 2&#13;
&#13;
Point to be noted: Remember! The code behind variable that we are accessing from the javascript that must be a class level variable to a method/function lavel variable.&#13;
&#13;
public partial class _Default : System.Web.UI.Page &#13;
{&#13;
    private string codeBehindVariable = "Hello World";// class elvel variable not method level&#13;
&#13;
    protected void Page_Load(object sender, EventArgs e)&#13;
&#13;
   {&#13;
&#13;
    }&#13;
&#13;
}&#13;
&#13;
The variavle access modifier muct not be private or you will the the compilation error,&#13;
&#13;
Error 2 '_Default.codeBehindVariable' is inaccessible due to its protection level &#13;
&#13;
How can we access javascript variable value from the code behind?&#13;
&#13;
Step 1:  Put a HiddenField control in your html.&#13;
&#13;
Step 2: Get the hiddenfield element id using document.GetElementByID() method and set the value property to any javascript variable.&#13;
&#13;
Step 3: Access the hidden field variable from the code behind to access the value(the value of the javascript variable).&#13;
&#13;
&lt;asp:Label&gt;&lt;/asp:Label&gt;&#13;
        &lt;asp:HiddenField&gt;  // Step 1&#13;
&#13;
 &#13;
&#13;
&lt;script&gt;&#13;
    var valToPass='Joydeep Sen';&#13;
   &#13;
      onload=function(){&#13;
        document.getElementById ('&lt;%=&gt;').value=valToPass;// Step 2&#13;
        &#13;
    }&#13;
    &lt;/script&gt;&#13;
&#13;
 &#13;
&#13;
 label1.Text = hiddenfield1.Value;// Step 3&#13;
&#13;
 I think these approaches are quite simple and straightforward.&lt;/p&gt;</description>
      <pubDate>Sun, 14 Feb 2010 22:32:04 UTC</pubDate>
      <guid>https://snipplr.com/view/28309/accessing-javascript-variable-from-code-behind-and-accessing-code-behind-variable-from-javascript</guid>
    </item>
    <item>
      <title>(JavaScript) getElementBySimilarId - erintechspired</title>
      <link>https://snipplr.com/view/28252/getelementbysimilarid</link>
      <description>&lt;p&gt;A simple, non-recursive function that I use to return the first element with an ID that contains a certain ID string. &#13;
Sometimes, APS.NET appends the Naming Container ID to the IDs of controls, and in instances where the ClientID of a control you want is not available, you can use this script to find the element you want by similar id. &#13;
Dirty, but works most of the time for me.&lt;/p&gt;</description>
      <pubDate>Fri, 12 Feb 2010 13:37:25 UTC</pubDate>
      <guid>https://snipplr.com/view/28252/getelementbysimilarid</guid>
    </item>
    <item>
      <title>(jQuery) Jquery Code  in ASP.NET UpdatePanel solution - delikassap</title>
      <link>https://snipplr.com/view/27398/jquery-code--in-aspnet-updatepanel-solution</link>
      <description>&lt;p&gt;Just replace classic document.ready with pageLoad function as belows:&#13;
&#13;
pageLoad function will called on all postback and partial postbacks. So it makes the jquery code no matter what :D &#13;
Even in update panel.&lt;/p&gt;</description>
      <pubDate>Sun, 31 Jan 2010 00:23:53 UTC</pubDate>
      <guid>https://snipplr.com/view/27398/jquery-code--in-aspnet-updatepanel-solution</guid>
    </item>
    <item>
      <title>(C#) Lowercase Area Routes in ASP.NET MVC2 - jmcd</title>
      <link>https://snipplr.com/view/27004/lowercase-area-routes-in-aspnet-mvc2</link>
      <description>&lt;p&gt;Use it on your AreaRegistrationContext via the extension MapRouteLowercase&lt;/p&gt;</description>
      <pubDate>Mon, 25 Jan 2010 08:43:46 UTC</pubDate>
      <guid>https://snipplr.com/view/27004/lowercase-area-routes-in-aspnet-mvc2</guid>
    </item>
    <item>
      <title>(C#) ASP.NET Pages Config - streamt</title>
      <link>https://snipplr.com/view/26564/aspnet-pages-config</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 16 Jan 2010 13:59:54 UTC</pubDate>
      <guid>https://snipplr.com/view/26564/aspnet-pages-config</guid>
    </item>
    <item>
      <title>(ASP) Send Email Using Gmail in ASP.NET - vikingdread</title>
      <link>https://snipplr.com/view/26442/send-email-using-gmail-in-aspnet</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 14 Jan 2010 05:23:14 UTC</pubDate>
      <guid>https://snipplr.com/view/26442/send-email-using-gmail-in-aspnet</guid>
    </item>
  </channel>
</rss>
