<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>All1 Source technologies &#187; ASP.NET</title>
	<atom:link href="http://www.all1sourcetech.com/tag/asp-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.all1sourcetech.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 23 Nov 2011 12:26:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASP.NET 4 and Visual Studio 2010 Released</title>
		<link>http://www.all1sourcetech.com/aspnet-4-visual-studio-2010-released/</link>
		<comments>http://www.all1sourcetech.com/aspnet-4-visual-studio-2010-released/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 11:05:53 +0000</pubDate>
		<dc:creator>Suzanne</dc:creator>
				<category><![CDATA[New Product Release]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET 4]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[net framework]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.all1sourcetech.com/?p=1055</guid>
		<description><![CDATA[ASP.NET 4 and Visual Studio 2010 are released, which include lots of new features and improvements that enable the developers to build, deploy and manage great Web sites and applications.
Need to Build Better Websites-
Visual Studio 2010
Visual Studio 2010 makes it easier to edit, search, and navigate code. Improved VB and C# Intellisense makes it even [...]]]></description>
			<content:encoded><![CDATA[<p>ASP.NET 4 and Visual Studio 2010 are released, which include lots of new features and improvements that enable the developers to build, deploy and manage great Web sites and applications.</p>
<p><strong>Need to Build Better Websites-</strong></p>
<p><strong>Visual Studio 2010</strong><br />
Visual Studio 2010 makes it easier to edit, search, and navigate code. Improved VB and C# Intellisense makes it even easier to find and use classes within the <a href="http://www.all1tunes.com" target="_blank">.NET Framework</a>. Improved JavaScript IntelliSense enables better AJAX development. </p>
<p>New code navigation and visualization features enable to find quickly and navigate large projects and visualize dependencies across your code-base. Improved unit testing, debugging and profiling help support builds robust applications.</p>
<p><strong>ASP.NET Web Forms</strong><br />
With ASP.NET 4, Web Forms controls now render clean, semantically correct, and CSS friendly HTML markup. Built-in URL routing functionality allows you to expose clean, <a href="http://www.all1social.com" target="_blank">search engine</a> friendly, URLs and increase the traffic to your Website.<br />
ViewState within applications is smaller and can now be more easily controlled. And more controls, including rich charting and data controls, are now built-into ASP.NET 4 and enable you to build applications even faster.</p>
<p><strong>ASP.NET MVC</strong><br />
ASP.NET MVC 2 is now built-into VS 2010 and ASP.NET 4, and provides a great way to build web sites and applications using a <a href="http://www.all1press.com" target="_blank">model-view-controller</a> based pattern. ASP.NET MVC 2 adds features to easily enable client and server validation logic, provides new strongly-typed HTML and UI-scaffolding helper methods, enables more modular/reusable applications, and facilitates a clean unit testing and TDD workflow with <a href="http://www.all1martpro.com" target="_blank">Visual Studio 2010</a>.</p>
<p><strong>Web Deployment</strong><br />
Visual Studio 2010 makes deploying your Websites easy. You can now publish your Websites and applications to a staging or production server from within Visual Studio itself. </p>
<p>Visual Studio 2010 makes it easy to transfer all your files, code, configuration, database schema and data in one complete package. VS 2010 also makes it easy to manage separate web.config configuration files settings depending upon whether you are in debug, release, staging or production modes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.all1sourcetech.com/aspnet-4-visual-studio-2010-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamically Setting the Theme</title>
		<link>http://www.all1sourcetech.com/dynamically-setting-theme/</link>
		<comments>http://www.all1sourcetech.com/dynamically-setting-theme/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 05:40:11 +0000</pubDate>
		<dc:creator>Suzanne</dc:creator>
				<category><![CDATA[Microsoft Technology]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[CSS files.]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[IHttpModule]]></category>
		<category><![CDATA[Load()]]></category>
		<category><![CDATA[Master pages]]></category>
		<category><![CDATA[PreInit()]]></category>
		<category><![CDATA[web.config]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.all1sourcetech.com/?p=1036</guid>
		<description><![CDATA[Themes can be used to customize the look of your Website. If you need to select the theme based on user settings, you’ll be glad to know that ASP.NET allows you to set the theme of a page dynamically when the page is being created. This process is pretty straight forward; however, there are a [...]]]></description>
			<content:encoded><![CDATA[<p>Themes can be used to customize the look of your<a href="http://www.all1Press.com" target="_blank"> Website</a>. If you need to select the theme based on user settings, you’ll be glad to know that<a title="ASP.NET" href="http://www.all1Press.com" target="_blank"> ASP.NET </a>allows you to set the theme of a page dynamically when the page is being created. This process is pretty straight forward; however, there are a couple of issues that may arise.</p>
<p>First of all, ASP.NET establishes the current<a title="theme" href="http://www.all1Press.com" target="_blank"> theme</a> prior to the page’s Load() event. <strong><span style="color: #993366;">In order to dynamically change the theme before the Load() event, you&#8217;ll need to set it during the page’s PreInit() event.</span></strong></p>
<p><strong>Setting the Theme in the PreInit() Event</strong></p>
<p>That was easy enough. But what happens if your site uses a master page?<a title="Master pages" href="http://www.all1Press.com" target="_blank"> Master pages </a>allow you to control the appearance of all the pages on your site from a single master page. So it makes sense to want to set the theme from the master page. However, master pages do not provide a PreInit() event. So setting the theme dynamically from a master page is not as easy as you might guess.</p>
<p><strong><span style="color: #993366;">One way to deal with this is to create a class that derives from<a href="http://www.all1Press.com" target="_blank"> IHttpModule. </a>This class can be made to respond to all page requests on your site, and it gets called just before the request is handled, in plenty of time to set the theme for the current page.</span></strong></p>
<pre>public class ThemeManager : IHttpModule</pre>
<pre>{
   public ThemeManager()</pre>
<pre>    {</pre>
<pre>    }</pre>
<pre>  public void Init(HttpApplication app)</pre>
<pre>    {</pre>
<pre>        // Set our handler to be called just before handling a request</pre>
<pre>        app.PreRequestHandlerExecute +=</pre>
<pre>            new EventHandler(Context_PreRequestHandlerExecute);</pre>
<pre>    }</pre>
<pre>  void Context_PreRequestHandlerExecute(object sender, EventArgs e)</pre>
<pre>    {</pre>
<pre>        // Note: If handler does not implement IRequiresSessionState or</pre>
<pre>        // IReadOnlySessionState then Session state will be unavailable</pre>
<pre>        if (HttpContext.Current.CurrentHandler is Page)</pre>
<pre>        {</pre>
<pre>            // Set theme</pre>
<pre>            Page page = (Page)HttpContext.Current.CurrentHandler;</pre>
<pre>            page.Theme = "MyTheme";</pre>
<pre>        }</pre>
<pre>        public void Dispose()</pre>
<pre>        {</pre>
<pre>        }</pre>
<pre>    }</pre>
<pre>}</pre>
<p><strong>Setting the Theme from an IHttpModule-Derived Class</strong></p>
<p>In order to use this class, you’ll have to modify your web.config file.</p>
<pre>&lt;configuration&gt;</pre>
<pre> &lt;system.web&gt;</pre>
<pre> &lt;httpModules&gt;</pre>
<pre> &lt;add /&gt;</pre>
<pre> &lt;/httpModules&gt;</pre>
<pre> &lt;/system.web&gt;</pre>
<pre>&lt;/configuration&gt;</pre>
<p><strong>Web.config Changes</strong></p>
<p>Also, be sure to clear any theme settings from your<a href="http://www.all1Press.com" target="_blank"> web.config file. </a>Otherwise, it’s possible for ASP.NET to get confused and possibly reference multiple CSS files.</p>
<p>ASP.NET themes are quite powerful, and can be used to manage the appearance of various controls and images. Another thing themes do is let you specify CSS, or style sheets. If this is all your themes are used for, then a much simpler approach can be taken.</p>
<p>All you need to do is add a Literal control inside of the &lt;head&gt; section of your master page. Then, you can set it to include your style sheet during the master page&#8217;s Load event.</p>
<p>Since you aren&#8217;t modifying the look of controls using skins, there is no need to change this setting in the PreInit() handler. In fact, you could handle it even later than the Load event since all that needs to happen is your page references the correct<a href="http://www.all1Press.com" target="_blank"> CSS file.</a></p>
<input id="gwProxy" type="hidden" />
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<p><a href="http://www.all1tunes.com" target="_blank">http://www.all1tunes.com</a></p>
<p><a href="http://www.all1social.com" target="_blank">http://www.all1social.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.all1sourcetech.com/dynamically-setting-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.Net Compilation Tool &#8211; do you want to allow updates without redeploying?</title>
		<link>http://www.all1sourcetech.com/aspnet-compilation-tool-updates-redeploying/</link>
		<comments>http://www.all1sourcetech.com/aspnet-compilation-tool-updates-redeploying/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 05:33:52 +0000</pubDate>
		<dc:creator>Suzanne</dc:creator>
				<category><![CDATA[Microsoft Technology]]></category>
		<category><![CDATA[.aspx pages]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web.config]]></category>
		<category><![CDATA[web.config file]]></category>
		<category><![CDATA[–u parameter]]></category>

		<guid isPermaLink="false">http://www.all1sourcetech.com/?p=1014</guid>
		<description><![CDATA[If we have an ASP.Net website that:
1.	We want to pre-compile before deploying to the live servers for the usual reasons of performance (no delay on first hit) and security (source code not hosted on the servers)
2.	Before starting the web application, we automatically generate its web.config file
3.	By default we want to disable view state in all [...]]]></description>
			<content:encoded><![CDATA[<p>If we have an <a title="ASP.Net" href="http://www.all1martpro.com" target="_blank">ASP.Net website</a> that:<br />
1.	We want to pre-compile before deploying to the live servers for the usual reasons of performance (no delay on first hit) and security (source code not hosted on the servers)<br />
2.	Before starting the web application, we automatically generate its <a href="http://www.all1martpro.com" target="_blank">web.config file</a><br />
3.	By default we want to disable view state in all the pages by adding a<br />
node in the generated web.config<br />
The main issue was that even though the generated web.config file had the correct setting in it, the view state wasn’t being disabled. This confused  us for quite a while.<br />
It turns out that the default setting when a website is compiled by the <a title="ASP.Net">ASP.Net compiler</a> doesn’t allow subsequent updates to the site.<br />
In our particular case, this meant the compiled pages were using the (default) value in our non-existent web.config at compile time, not the one actually on the server at runtime.<br />
Once we realised that, the solution was easy:<span style="color: #993366;"> <strong>simply add a –u parameter to the compiler flags</strong> </span>which meant:<br />
<strong>-u specifies that the Aspnet_compiler.exe should create a precompiled application that allows subsequent updates of contents such as .aspx pages.</strong><br />
If this option is omitted, the resulting application contains only compiled files and cannot be updated on the deployment server. You can update the application only by changing the source markup files and recompiling.</a></p>
<p><a href="http://www.all1Press.com" target="_blank">http://www.all1Press.com</a></p>
<p><a href="http://www.all1tunes.com" target="_blank">http://www.all1tunes.com</a></p>
<p><a href="http://www.all1social.com" target="_blank">http://www.all1social.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.all1sourcetech.com/aspnet-compilation-tool-updates-redeploying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4 Steps to Consume Web Services using Ajax</title>
		<link>http://www.all1sourcetech.com/4-steps-consume-web-services-ajax/</link>
		<comments>http://www.all1sourcetech.com/4-steps-consume-web-services-ajax/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 11:20:14 +0000</pubDate>
		<dc:creator>Naggie</dc:creator>
				<category><![CDATA[Microsoft Technology]]></category>
		<category><![CDATA[Purely Technical]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[ASP developers]]></category>
		<category><![CDATA[ASP framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET code]]></category>
		<category><![CDATA[customer ID]]></category>

		<guid isPermaLink="false">http://www.all1sourcetech.com/?p=1001</guid>
		<description><![CDATA[Normally the browser Ajax controls calls the ASP.NET code and the ASP.NET code consumes the web service, but there are scenarios where you would like to call the web services directly from the Ajax JavaScript functions rather than calling via the behind code.
Here, you can get the same following 4 steps-
Step 1: Create your Customer [...]]]></description>
			<content:encoded><![CDATA[<p>Normally the <strong>browser Ajax</strong> controls calls the <a href="http://www.all1martpro.com" target="_blank">ASP.NET code</a> and the ASP.NET code consumes the web service, but there are scenarios where you would like to call the web services directly from the Ajax <a href="http://www.all1tunes.com" target="_blank">JavaScript</a> functions rather than calling via the behind code.</p>
<p>Here, you can get the same following 4 steps-</p>
<p><strong>Step 1: <span style="color: #800000;">Create your Customer Class </span></strong></p>
<p>The first step is to create the <a href="http://www.all1press.com" target="_blank">customer</a> class as shown below. So the customer class has 4 properties on customer id, first name, address and designation.</p>
<p><span style="color: #0000ff;"><strong>public </strong></span><strong>class Customers</strong><br />
<strong>{</strong><br />
<strong><span style="color: #99cc00;">// private properties </span></strong><br />
<strong>private int _intCustomerID;</strong><br />
<span style="color: #0000ff;"><strong>private string</strong></span><strong> _strFirstName;</strong><br />
<span style="color: #0000ff;"><strong>private string</strong></span><strong> _strAddress;</strong><br />
<span style="color: #0000ff;"><strong>private string</strong></span><strong> _strDesignation;</strong><br />
<strong><br />
</strong></p>
<p><strong><span style="color: #99cc00;">// Public property and</span> </strong><br />
<span style="color: #0000ff;"><strong>public</strong></span><strong> </strong><span style="color: #0000ff;"><strong>int </strong></span><strong>CustomerID</strong><br />
<strong>{</strong><br />
<span style="color: #0000ff;"><strong>get</strong></span><br />
<strong>{</strong><br />
<span style="color: #0000ff;"><strong>return </strong></span><strong>_intCustomerID;</strong><br />
<strong>}</strong><br />
<span style="color: #0000ff;"><strong>set</strong></span><br />
<strong>{</strong><br />
<strong>_intCustomerID = value;</strong><br />
<strong>}</strong><br />
<strong>}</strong><br />
<span style="color: #0000ff;"><strong>public string </strong></span><strong>FirstName</strong><br />
<strong>{</strong><br />
<span style="color: #0000ff;"><strong>get</strong></span><br />
<strong>{</strong><br />
<span style="color: #0000ff;"><strong>return </strong></span><strong>_strFirstName;</strong><br />
<strong>}</strong><br />
<span style="color: #0000ff;"><strong>set</strong></span><br />
<strong>{</strong><br />
<strong>_strFirstName = value;</strong><br />
<strong>}</strong><br />
<strong>}</strong></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public class Customers</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">// private properties</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private int _intCustomerID;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private string _strFirstName;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private string _strAddress;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private string _strDesignation;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">// Public property and</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public int CustomerID</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">get</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return _intCustomerID;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">set</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">_intCustomerID = value;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public string FirstName</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">get</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return _strFirstName;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">set</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">_strFirstName = value;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 770px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<p><strong>Step 2: <span style="color: #800000;">Create your Web Service</span></strong></p>
<p>The next step is to create the web service which exposes the customer class to UI. Here is a simple web service which has encapsulated customer collection. In the constructor, we are loading some dummy data into the list of customers as shown in the below code snippet:</p>
<p><strong>   [System.Web.Script.Services.ScriptService]</strong><br />
<strong><span style="color: #0000ff;">public class </span>Customer : System.Web.Services.WebService {</strong></p>
<p><strong><span style="color: #99cc00;">// Customer collection</span></strong><br />
<strong>List&lt;Customers&gt; listcust = <span style="color: #0000ff;">new </span>List&lt;Customers&gt;();</strong><br />
<strong><span style="color: #0000ff;">public </span>Customer () </strong><br />
<strong>{</strong><br />
<strong><span style="color: #99cc00;">//Load some dummy data in to customer collection.</span></strong><br />
<strong>listcust.Clear();</strong></p>
<p><strong>Customers cust = <span style="color: #0000ff;">new </span>Customers();</strong><br />
<strong>cust.CustomerID = 1;</strong><br />
<strong>cust.FirstName = &#8220;Dan&#8221;;</strong><br />
<strong>cust.Address = &#8220;Live in UK&#8221;;</strong><br />
<strong>cust.Designation = &#8220;Software Developer&#8221;;</strong><br />
<strong>listcust.Add(cust);</strong></p>
<p><strong>cust = <span style="color: #0000ff;">new </span>Customers();</strong><br />
<strong>cust.CustomerID = 2;</strong><br />
<strong>cust.FirstName = &#8220;Sheen&#8221;;</strong><br />
<strong>cust.Address = &#8220;Live in Austrailia&#8221;;</strong><br />
<strong>cust.Designation = &#8220;Web Designer&#8221;;</strong><br />
<strong>listcust.Add(cust);</strong></p>
<p><strong>cust = <span style="color: #0000ff;">new </span>Customers();</strong><br />
<strong>cust.CustomerID = 3;</strong><br />
<strong>cust.FirstName = &#8220;Koraine&#8221;;</strong><br />
<strong>cust.Address = &#8220;Live in London&#8221;;</strong><br />
<strong>cust.Designation = &#8220;Architect&#8221;;</strong><br />
<strong>listcust.Add(cust);</strong><br />
<strong>}</strong></p>
<p><strong><span style="color: #99cc00;">// This function exposes all customers to the end client’</span></strong><br />
<strong>[WebMethod]</strong><br />
<strong><span style="color: #0000ff;">public </span>List&lt;Customers&gt; LoadCustomers()</strong><br />
<strong>{</strong><br />
<strong><span style="color: #0000ff;">return </span>listcust;</strong><br />
<strong>}</strong></p>
<p><strong><span style="color: #99cc00;">// This function helps us to get customer object based in ID</span></strong><br />
<strong>[WebMethod]</strong><br />
<strong><span style="color: #0000ff;">public </span>Customers LoadSingleCustomers(<span style="color: #0000ff;">int </span>_customerid)</strong><br />
<strong>{</strong><br />
<strong><span style="color: #0000ff;">return </span>(Customers)listcust[_customerid-1];</strong><br />
<strong>}</strong></p>
<p>Two functions have been exposed with the web service, one which gives out a list of customers and another which gives out individual customer data based on customer id.</p>
<p><strong>Step 3: <span style="color: #800000;">Reference your Web Service using the asp:servicereference</span></strong></p>
<p>Using the ‘<span style="color: #ff0000;">asp:ServiceReference</span>’, the path to the ASMX file will be pointed as shown in the below code snippet. This will generate the <a href="http://www.all1social.com" target="_blank">JavaScript proxy</a> which can be used to call the customer object.</p>
<pre><strong>&lt;asp:ScriptManager <span style="color: #ff0000;">ID</span>="<span style="color: #0000ff;">ScriptManager1</span>" <span style="color: #ff0000;">runat</span>="<span style="color: #0000ff;">server</span>"&gt;</strong></pre>
<pre><strong>    &lt;Services&gt;</strong></pre>
<pre><strong>        &lt;asp:ServiceReference <span style="color: #ff0000;">Path</span>="<span style="color: #0000ff;">Customer.asmx</span>" /&gt;</strong></pre>
<pre><strong>    &lt;/Services&gt;</strong></pre>
<pre><strong>&lt;/asp:ScriptManager&gt;</strong></pre>
<p><strong>Step 4: <span style="color: #800000;">Call the Webservice and the JavaScript Code</span></strong></p>
<p>Once you have defined the proxy, you can now call the ‘Customer’ proxy directly to make method calls.</p>
<p><strong>function LoadAll() </strong><br />
<strong>{</strong><br />
<strong>Customer.LoadCustomers(LoadCustomerToSelectOption, ErrorHandler, TimeOutHandler);</strong><br />
<strong>}</strong></p>
<p>When you call the JavaScript proxy object, then you need to provide three functions; the first function (‘LoadCustomerToSelectOption’) will be called when the web service finishes and returns data. The data will be returned in the fill variable which will then be looped and added to the customer combo box.</p>
<p><strong>function LoadCustomerToSelectOption(Fill)</strong><br />
<strong>{</strong><br />
<strong><span style="color: #0000ff;">var </span>select = document.getElementById(&#8221;<span style="color: #800000;">cmbCustomers</span>&#8220;);</strong><br />
<strong><br />
</strong></p>
<p><strong><span style="color: #0000ff;">for </span>(<span style="color: #0000ff;">var </span>i = 0; i &lt; Fill.length; i++) </strong><br />
<strong>{</strong><br />
<strong><span style="color: #0000ff;">var </span>value = <span style="color: #0000ff;">new </span>Option(Fill[i].FirstName, Fill[i].CustomerID);</strong><br />
<strong>select.options.add(value);</strong><br />
<strong>}</strong><br />
<strong>}</strong></p>
<p>There are two more functions which are attached; one which handles error and the other which handles time out.</p>
<p><strong>function ErrorHandler(result) </strong><br />
<strong>{</strong><br />
<strong><span style="color: #0000ff;">var </span>msg = result.get_exceptionType() + &#8220;<span style="color: #800000;">\r\n</span>&#8220;;</strong><br />
<strong>msg += result.get_message() + &#8220;<span style="color: #800000;">\r\n</span>&#8220;;</strong><br />
<strong>msg += result.get_stackTrace();</strong><br />
<strong>alert(msg);</strong><br />
<strong>}</strong><br />
<strong>function TimeOutHandler(result) </strong><br />
<strong>{</strong><br />
<strong>alert(&#8221;<span style="color: #800000;">Timeout </span>:&#8221; + result);</strong><br />
<strong>}</strong></p>
<p><a href="http://www.all1martpro.com" target="_blank">http://www.all1martpro.com</a><br />
<a href="http://get-a-designer.com/" target="_blank">http://get-a-designer.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.all1sourcetech.com/4-steps-consume-web-services-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postback Text Processing with the AJAX Modal Dialog</title>
		<link>http://www.all1sourcetech.com/postback-text-processing-ajax-modal-dialog/</link>
		<comments>http://www.all1sourcetech.com/postback-text-processing-ajax-modal-dialog/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 06:28:36 +0000</pubDate>
		<dc:creator>Suzanne</dc:creator>
				<category><![CDATA[Microsoft Technology]]></category>
		<category><![CDATA[Purely Technical]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[AJAX Editor Control]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ModalPopup control]]></category>
		<category><![CDATA[ModalPopupExtender]]></category>
		<category><![CDATA[Text Processing]]></category>

		<guid isPermaLink="false">http://www.all1sourcetech.com/?p=932</guid>
		<description><![CDATA[In this case the developer wanted to use an AJAX Editor Control inside a ModalPopup control.
This isn’t a problem but, the user needed to clicking the OK button to cause a post-back so that he could execute some server –side logic.
The ”Ok” Button is an ASP.NET control but adding a Click Event Handler for the [...]]]></description>
			<content:encoded><![CDATA[<p>In this case the developer wanted to use an <a title="AJAX Editor Control" href="http://www.all1social.com" target="_blank">AJAX Editor Control </a>inside a ModalPopup control.</p>
<p>This isn’t a problem but, the user needed to clicking the OK button to cause a post-back so that he could execute some server –side logic.</p>
<p>The ”Ok” Button is an <a title="ASP.NET " href="http://www.all1social.com" target="_blank">ASP.NET </a>control but adding a Click Event Handler for the button didn’t solve the problem because it didn’t get executed when the use Clicked on the “Ok” button.</p>
<p>Normally the ModalPopupExtender would be used like this.</p>
<pre>    <strong>&lt;ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"</strong></pre>
<pre><strong>                 TargetControlID="LinkButton1"</strong></pre>
<pre><strong>                 PopupControlID="Panel1"</strong></pre>
<pre><strong>                 BackgroundCssClass="modalBackground"</strong></pre>
<pre><strong>                 DropShadow="true"</strong></pre>
<pre><strong>     1.)         OkControlID="OkButton"</strong></pre>
<pre><strong>     2.)         OnOkScript="onOk()"</strong></pre>
<pre><strong>                 CancelControlID="CancelButton" /&gt;</strong></pre>
<p>Line number 1 tells the control to catch the click event for the Ok Button Control instance and line 2 specifies when CLIENT SIDE JavaScript code to execute when the control specifies in line 1 is clicked.</p>
<p>The post-back doesn’t happen (even if the ASP.NET Button control has a click event handler defined in code behind because the control doesn’t propagate it.)</p>
<p>So <span style="color: #993366;"><strong>Just delete those two lines</strong> !</span></p>
<p>It turns out that they are optional and if you delete them the click event is not trapped and the code behind will execute as expected.</p>
<p>So just nake it look like this:</p>
<pre>    <strong>&lt;ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"</strong></pre>
<pre><strong>                 TargetControlID="LinkButton1"</strong></pre>
<pre><strong>                 PopupControlID="Panel1"</strong></pre>
<pre><strong>                 BackgroundCssClass="modalBackground"</strong></pre>
<pre><strong>                 DropShadow="true"</strong></pre>
<pre><strong>                 CancelControlID="CancelButton" /&gt;</strong></pre>
<p><a href="http://www.all1sourcetech.com" target="_blank">http://www.all1sourcetech.com</a></p>
<p><a href="http://www.all1martpro.com" target="_blank">http://www.all1martpro.com</a></p>
<input id="gwProxy" type="hidden" />
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<input id="gwProxy" type="hidden" />
<input id="jsProxy" onclick="jsCall();" type="hidden" />
]]></content:encoded>
			<wfw:commentRss>http://www.all1sourcetech.com/postback-text-processing-ajax-modal-dialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 clean application level web.config</title>
		<link>http://www.all1sourcetech.com/visual-studio-2010-clean-application-level-webconfig/</link>
		<comments>http://www.all1sourcetech.com/visual-studio-2010-clean-application-level-webconfig/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 11:52:28 +0000</pubDate>
		<dc:creator>Naggie</dc:creator>
				<category><![CDATA[Microsoft Technology]]></category>
		<category><![CDATA[Purely Technical]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[asp.net chart control]]></category>
		<category><![CDATA[asp.net technology]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[web application]]></category>
		<category><![CDATA[web.config]]></category>

		<guid isPermaLink="false">http://www.all1sourcetech.com/?p=906</guid>
		<description><![CDATA[Introducing new small improvement that has been made in Visual Studio 2010 &#38; .NET 4 to reduce the size of the ASP.NET application level web.config 3.0 and 3.5 web.config
As ASP.NET technology evolved, the application level Web.config had new things added to it. Since the earlier frameworks were using the same set of machine level configuration [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introducing new small improvement</strong> that has been made in Visual Studio 2010 &amp; .NET 4 to reduce the size of the <strong>ASP.NET application</strong> level web.config 3.0 and 3.5 web.config</p>
<p>As <a href="http://www.all1Press.com" target="_blank">ASP.NET technology</a> evolved, the application level Web.config had new things added to it. Since the earlier frameworks were using the same set of machine level configuration files, incremental feature that was added subsequent to the 2.0 release resulted in additional config settings included in the file.<br />
.NET 4 web.config</p>
<p>With .NET 4, the web.config is tremendously reduced in size to improve the simplicity  of ASP.NET</p>
<p>The config settings have been moved down to the machine config file. This includes registers all of the ASP.NET tag sections, handlers, modules and settings for the following:<br />
•	ASP.NET AJAX<br />
•	ASP.NET Dynamic Data<br />
•	ASP.NET Routing<br />
•	ASP.NET Chart Control</p>
<p>You can look at the trimmed down web.config by creating a .Net 4 &#8216;ASP.NET Empty Web Application&#8217; in <a href="http://www.all1martpro.com" target="_blank">Visual Studio 2010</a>.</p>
<p>Following is the web.config file for .NET 4 C# &#8216;ASP.NET Empty Web Application&#8217;:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010cleanweb.config_13513/image_thumb.png" alt="image thumb Visual Studio 2010 clean application level web.config" width="644" height="229" title="Visual Studio 2010 clean application level web.config" /></p>
<p>The config file above has settings to tell ASP.NET to enable debugging by default for the application and provides the version of .NET framework to use.</p>
<p><a href="http://www.all1tunes.com" target="_blank">http://www.all1tunes.com</a></p>
<p><a href="http://www.all1social.com" target="_blank">http://www.all1social.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.all1sourcetech.com/visual-studio-2010-clean-application-level-webconfig/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download ASP.NET MVC 2 RC 2</title>
		<link>http://www.all1sourcetech.com/download-asp-net-mvc-2-rc-2/</link>
		<comments>http://www.all1sourcetech.com/download-asp-net-mvc-2-rc-2/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 11:36:41 +0000</pubDate>
		<dc:creator>Naggie</dc:creator>
				<category><![CDATA[Microsoft Technology]]></category>
		<category><![CDATA[New Product Release]]></category>
		<category><![CDATA[Technical News]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET 3.5 SP 1]]></category>
		<category><![CDATA[ASP.NET MVC application]]></category>
		<category><![CDATA[Model-View-Controller]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Windows Server 2003]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.all1sourcetech.com/?p=440</guid>
		<description><![CDATA[ASP.NET MVC 2 RC 2 provides a new Model-View-Controller (MVC) framework on top of the existing ASP.NET 3.5 SP1 runtime.
ASP.NET MVC 2 is a framework for developing highly testable and maintainable Web applications by leveraging the Model-View-Controller (MVC) pattern. The framework encourages developers to maintain a clear separation of concerns among the responsibilities of the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>ASP.NET MVC 2 RC 2</strong> provides a new Model-View-Controller (MVC) framework on top of the existing ASP.NET 3.5 SP1 <a href="http://www.all1tunes.com" target="_blank">runtime</a>.</p>
<p>ASP.NET MVC 2 is a framework for developing highly testable and maintainable Web applications by leveraging the Model-View-Controller (MVC) pattern. The framework encourages developers to maintain a clear separation of concerns among the responsibilities of the application – the UI logic using the view, user-input handling using the controller, and the domain logic using the model. <a href="http://www.all1social.com" target="_blank">ASP.NET MVC applications</a> are easily testable using techniques such as test-driven development (TDD).</p>
<p>The installation package includes templates and tools for Visual Studio 2008 SP 1 to increase productivity when writing ASP.NET MVC applications. For example, the Add View dialog box takes advantage of customizable code generation (T4) templates to generate a view based on a model object. The default project template allows the developer to automatically hook up a unit-test project that is associated with the ASP.NET MVC application.</p>
<p>Because the ASP.NET MVC framework is built on <a href="http://www.all1martpro.com" target="_blank">ASP.NET 3.5 SP 1</a>, developers can take advantage of existing ASP.NET features like authentication and authorization, profile settings, localization, and so on.</p>
<p>System Requirements</p>
<p>-Supported Operating Systems: Windows 7; Windows Server 2003; Windows Server 2008; Windows Vista; Windows XP</p>
<p>.NET 3.5 SP1. Visual Studio 2008, Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 are required to use certain parts of this feature.</p>
<p><a href="http://get-a-designer.com/" target="_blank">http://get-a-designer.com</a></p>
<p><a href="http://www.all1sourcetech.com" target="_blank">http://www.all1sourcetech.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.all1sourcetech.com/download-asp-net-mvc-2-rc-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

