TechBubbles

Archive for the 'ASP.NET' Category

Performance Tricks to Metro Style Web Applications

 

What is web performance? It is actually when does the user perform an action it self and when does those results occur on the screen. The three key factors to web performance is Network, CPU and Memory.

image

The web developer has to think about the above three element to improve the performance of a web application. You can measure your web site performance using windows performance toolkit which is the part of windows 7 SDK. You can download the toolkit from here. There is great post how to use this toolkit which you can read from here. We all know these tricks but we ignore sometime which costs severely in web application performance. You can use the below tricks are as check-list while building your web application.

The tricks are

Read more

Related Posts:

No comments

WebSockets in ASP.NET 4.5

 

This post discuss about using WebSockets in ASP.NET 4.5. You can read this post to get an understanding about WebSockets. This post shows piece of code which uses WebSockets in ASP.NET 4.5 and the code is related to simple chat application.

The HTML of Web Form chat application looks as below

image 

It contains a text box where you can type your text message and button where it sends a message to the server. You can notice there is <ul> element which shows the list of other messages which are arriving from the server.

Read more

Related Posts:

No comments

Calling ASP.NET AJAX Modal Window from JavaScript

 

This post discusses about calling AJAX model window from JavaScript. The scenario is checking the UI controls in page and alerting the user if he is leaving the page without saving the data. This shows confirmation window with yes and no buttons.

The Form body code looks as below

   1: <body id="Body">

   2:     <form name="Form" method="post" runat="server">

   3:     <asp:ScriptManager ID="mgr1" runat="server"></asp:ScriptManager>

   4:     <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

   5:     <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

   6:     <asp:DropDownList ID="DropDownList1" runat="server">

   7:         <asp:ListItem Value="no" Selected="True">NO</asp:ListItem>

   8:         <asp:ListItem Value="yes">YEs</asp:ListItem>

   9:     </asp:DropDownList>

  10:  

  11:     <asp:Button ID="Button1" runat="server" Text="Button" 

  12:      OnClientClick="javascript:return UnSaved();" />

  13:  

  14:     <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" 

  15:            runat="server" TargetControlID="btnHid"

  16:         PopupControlID="pnlSave" BackgroundCssClass="modalBackground"

  17:           CancelControlID="btnCancel"

  18:         PopupDragHandleControlID="panEdit">

  19:     </ajaxToolkit:ModalPopupExtender>

  20:     <asp:Button runat="server" ID="Button3" Style="display: none;" />


  21:     <asp:Panel ID="pnlSave" runat="server" BorderColor="Black" 

                   BorderWidth="3px" 

  22:          Height="100px" Width="180px">

  23:         <table width="100%">

  24:             <tr>

  25:                 <td >

  26:                     Do You want to save data?

  27:                 </td>

  28:             </tr>

  29:         </table>

  30:         <br />

  31:         <asp:Button ID="Button2" runat="server" Text="Save" />

  32:         <asp:Button ID="btnCancel" runat="server" Text="No" />

  33:     </asp:Panel>

  34:     <asp:Button runat="server" ID="btnHid" Style="display: none;" />

  35:     </form>

  36: </body>

Read more

Related Posts:

No comments

Creating Data-driven web apps using ASP.NET 4.5 Web Forms

 

Data binding is simpler and more powerful in ASP.NET 4.5 Web Forms.This post discuss about creating Data-driven application using ASP.NET 4.5 preview. It also discuss about different Data access methods, particularly about model access binding features in Web Forms. You need to install Visual Studio 11 Developer preview to use this feature. You can read this post for links to download etc.. ASPNET_vNext

Typical ASP.NET developer may use one of the following Data Access mechanisms for binding the data

  • You may setup your Database First – Creating a Schema and generating model from it. Here model is a class which you are going to interact with your database from your code.
  • You may setup your Model First – Instead of designing the database first, we design the entity model first eg: using entity framework. Design your model first and then generate a schema and code.
  • You may setup your Code First- In this approach you first write code to design the model and then generate a schema using that code.

Read more

Related Posts:

1 comment

Web Standards Update for Visual Studio 2010 Editor

 

Web Standards Update for Visual Studio 2010 SP1, which provides HTML5 and CSS3 support. Microsoft team said Visual Studio next version have better support for HTML5. This update gives you HTML5 Intellisense and fixes some bugs in SP1 support for HTML5. CSS3 intellisense on latest specification from W3C. vshtml5

Download Web Standards Update for Visual Studio 2010 Editor

Please note this is not an official release from Microsoft.

HTML 5 Features support in this update

Complete Valid Markup -

We need a type attribute in script tag in SP1. It throws a validation error if you miss the attribute. Now you do not need to put this attribute. New items in the type list like text/x-jquery-tmpl

image

Read more

Related Posts:

1 comment

Deploying Database with ASP.NET Web application

 

Web applications can be deployed in two different ways one by using one-click publish or by using a Web deployment package. Usually we may want to deploy our database scripts that we used along with the application deployment. This post discusses the procedures to deploy the database along with web application in Visual Studio 2010.

Assume there is no database exist in destination and configure the below steps for first-time database deployment

Read more

Related Posts:

1 comment

Introducing DotnetSizzler.com

fireworks

Dear Readers,

I have come up with a new BLOG DotnetSizzler that serves as a center that offers my services and is a platform for discussion and sharing of Tips & Tricks, Design Principles, Best practices, updates and techniques pertaining to Microsoft Technologies.

Major Stress will be on code snippets on .NET Technologies. I am to share the projects that I have lead and wish to continue as a freelance programmer.

I promise you to keep both my BLOGS DotnetSizzler and Techbubbles interesting, up to date and informative. I thank you for your support and hope you will  continue the same.  

Be sure to check the DotnetSizzler and feel free to add your comments, suggestions and questions.  


Share this post :

Related Posts:

  • No Related Posts
No comments

WebForms Routing in ASP.NET 4

This post explains about WebForms routing features available in ASP.NET 4. Routing feature originally designed for ASP.NET MVC and now available for Webforms as well. You need to install Visual Studio 2010 ultimate beta2 to try the routing features in ASP.NET 4.

 

1. Create a ASP.NET Web Application in Visual Studio 2010 as follows

image  

Read more

Related Posts:

2 comments

Dynamic Metadata using ASP.NET 4.0

This post explains about Dynamically assigning Metadata to a page using code behind in ASP.NET 4.0. Metadata is so important as Search engine optimization considers Metadata keywords and description to index  the page. If you can dynamically assign the metadata to your page then search engine can easily analyze and puts the page in results list.

1. Create a ASP.NET web application in VS 2010 and add a grid view to the page

image 

Read more

Related Posts:

No comments

WCF Service using ASP.NET AJAX Library

More often, the data to shown in an AJAX page is retrieved from the Web server using a Web service, a Windows Communication Foundation (WCF) service. The services that can also return JavaScriptObjectNotation(JSON) are potential candidates for AJAX pages.

This post explains about calling a WCF service using ASP.NET AJAX Library Data View control. The following are the steps to create and call the service using ASP.NET AJAX Library.

1. Creating a AJAX enabled WCF service

2. Loading the required scripts

3. Calling a service using ASP.NET AJAX Data View Control

Read more

Related Posts:

1 comment

Next Page »