aspx Tutorial

NET Articles,jQuery demo, asp.net with jQuery, online tutorial,Jquery, SilverLight, Javascript, asp.net,JSON, MVC,.NET Articles,demo, Web Services,
Advertise Here

Toolbar

Get our toolbar!

Advertize



{#advanced_dlg.about_title}
by Aamir Hasan   on Friday, September 7, 2012
Here Aamir Hasan has explained how to disable right click on HTML div. More
{#advanced_dlg.about_title}
by Aamir Hasan   on Monday, June 6, 2011
There are lots of Reporting types which are missing in SQL reporting Services. Now this is possible using third party tool with SQL reporting Services named Dundas Charts for Reporting Services supported in SQL Server Reporting Services. There are four reporting controls available. More
{#advanced_dlg.about_title}
by Aamir Hasan   on Monday, March 21, 2011
In this article, we will discuss how to load XML data into a dataset and bind to DataList. To do this we will use ADO.NET provider’s method. More
{#advanced_dlg.about_title}
by Aamir Hasan   on Friday, February 4, 2011
By default, the web server assigns random selected port for localhost.. More
{#advanced_dlg.about_title}
by Aamir Hasan   on Tuesday, January 11, 2011
In this post, you will see how to get number of active visitor's online in asp.net web site... More
{#advanced_dlg.about_title}
by Aamir Hasan   on Monday, December 6, 2010
Yesterday developer asked me, distinct method on a column using linq is not woking. So, i have decided to wite this example in my blog to share with all of you. Let’s startOpen your Visual Studio 2008/2010 from File -> New -> New Web Site. Following is the code of Default.aspx page.<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title></title></head><body>    <form id="form1" runat="server">    <div>        <asp:GridView ID="GridView1" runat="server">        </asp:GridView>    </div>    </form></body></html>Following is the code of Default.aspx.cs page. protected void Page_Load(object sender, EventArgs e)    {        GridView1.DataSource = from i in getAllEmployee()                               group i by i.FullName into temp1                               select temp1.Key;        GridView1.DataBind();    }    public List<Employee> getAllEmployee()    {        List<Employee> emp = new List<Employee>()        {            new Employee(){ ID=1, FullName="Aamir Hasan", Age=25 },            new Employee(){ ID=2, FullName="Awais Ahmed", Age=21 },            new Employee(){ ID=3, FullName="Saba khan", Age=11 },            new Employee(){ ID=4, FullName="Mahwish Hasan", Age=18 },            new Employee(){ ID=5, FullName="Hina", Age=26 },            new Employee(){ ID=6, FullName="John", Age=24 },            new Employee(){ ID=7, FullName="Aamir Hasan", Age=22 },            new Employee(){ ID=8, FullName="Awais Ahmed", Age=21 },            new Employee(){ ID=9, FullName="Aamir Hasan", Age=20 },          };        return emp;    }    public class Employee    {        public int ID { get; set; }        public String FullName { get; set; }        public int Age { get; set; }    } Note: You can get distinct values of any column by using above  linq query syntax. Output Download Linq-Distinct-column-fetch-records.zip (1.11 kb) See live demo
{#advanced_dlg.about_title}
by Aamir Hasan   on Tuesday, November 23, 2010
By default, line numbering is disabled in Visual Studio 2010. More
{#advanced_dlg.about_title}
by Aamir Hasan   on Wednesday, November 17, 2010
Several times,this question has been asked that how to print a page in Silverlight, thanks to Microsoft who  have given this print support in Silverlight 4. Before going to start you must have installed Visual Studio 2010 and Silverlight 4.Let’s start. Open your Visual Studio 2010, from File -> New Project -> Select Silverlight template -> give a name and click OK button to continue. Following is the code of  Main.xaml file.<UserControl x:Class="Silverlight4_Printing.MainPage"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"    mc:Ignorable="d"    d:DesignHeight="400"  d:DesignWidth="560" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">    <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Center">        <sdk:Label Height="28" HorizontalAlignment="Left" Margin="10,10,0,0" Name="label1" VerticalAlignment="Top" Width="297" />        <Button Content="Print" Height="23" HorizontalAlignment="Left" Margin="66,103,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />    </Grid></UserControl>Following is the code of  Main.xaml.cs file        public MainPage()        {            InitializeComponent();            label1.Content = "Welcome to aspxtutorial.com";        }        private void button1_Click(object sender, RoutedEventArgs e)        {            var document = new PrintDocument();            document.PrintPage += (s, args) =>            {                args.PageVisual = LayoutRoot; args.HasMorePages = false;                button1.Visibility = Visibility.Collapsed;            };            document.EndPrint += (s, args) =>            {                button1.Visibility = Visibility.Visible;            };            document.Print("Silverlight Print Page");        } Output Download Silverlight 4 - Printing page.zip (252.13 kb) See live demo
{#advanced_dlg.about_title}
by Aamir Hasan   on Sunday, September 12, 2010
FlowChart is new type in WorkFlow. it is used to eaily mantains Large Applications.Old version of Workflow , the WorkflowRuntime was restricted to one WorkflowRuntime. Now WorkFlowInstance has been replaced with the class WorkflowInstance.Now you can easily attached Event Handler and delegate to each workflow becasue of Class WorkflowInstance. Open your Visual Studio 2010. Create new workflow console application from visual studio Menu New->Project. From Solution Explorer double click on Workflow1.xaml file. Drag and drop a Flowchart activity from Flowchart group onto the desginer surface as shown in Figure 1.1 Figure 1.1 The green circle indicates where the workflow starts. Drag and drop WriteLine activity to surface area from Primitives group as shown in Figure 1.2 Figure 1.2 Take your mouse pointer to green circle, three gray dot will be appear, drag a node to writeline activity and drop it on one gray node. You will see the direction of workflow from circle to writeline as shown in Figure 1.3 Figure.1.3 Goto the properties of Writeline activity and Click the linkbutton of text. Small window will be open write the VB expression as shown in below Figure 1.4 Figure 1.4 Open your Program.cs file and add Console.Write("Press enter to exit."); Console.ReadKey();   Console.ReadKey() will prevent to immedialtely close of window. Press F5 to run it. Figure 1.5 shows the output. Figure 1.5 Download Part 1 - Workflow Console Application Password aamirhasan
{#advanced_dlg.about_title}
by Aamir Hasan   on Sunday, August 22, 2010
In this Article, i will tell you  about two new properties added to the page in ASP.NET 4.O that are MetaKeywords MetaDescription By using these two properties you can optimize your site for SEO. MetaKeywords List of keyword phrases that you are targets for specific page. MetaDescription Meta Description is used to display the content of your page in your earch engines. Note:Meta Description should not be more then 200 characters.   You can also set these two properties wthin the @Page directive at the top of .aspx pages as shown in below Figure 1.1 Figure 1.1 You can set these two properties programmatically within code-behind page classes as shown in Figure 1.2 . By using programmatically set keywords and description manually or reading them from database. Figure 1.2 I am using firebug to display the HTML output as you can see in Figure 1.3. At @Page level and on Page Load meta keywords and meta descriptions render and meta tag are display under the head section of HTML output page. Figure 1.3 Conclusion In ASP.NET 4.0 it is very easy to declare the keywords and description for the pages. By using MetaKeywords and MetaDescription makes your Web site SEO friendly Download Click here to download source code Password aamirhasan Demo Click here to see online Demo
Advertizement 1
Advertizement 2
Advertizement 3
Advertizement 4
Advertizement 5