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 Sunday, January 2, 2011
In this article you will see that how to load web user control dynamically using jQuery. More
{#advanced_dlg.about_title}
by Aamir Hasan   on Tuesday, December 21, 2010
The following example demonstrates how can we count the number of rows in a table using jQuery.. More
{#advanced_dlg.about_title}
by Aamir Hasan   on Monday, December 13, 2010
how to load web user control dynamically in your ASP.NET web form 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 Wednesday, November 24, 2010
How to display row number in gridview... More
{#advanced_dlg.about_title}
by Aamir Hasan   on Saturday, November 20, 2010
Serval times this question has been asked from me that how to create linq to SQL connection in asp.net. So, i have decided to write this example here.In this example, I have used northwind database. First, I have created a connection string and establish a connection between object to database, then select [categoryname] from [categories] table.Finally, through loop i have display the category names on the page.Here’s the solution        string connectionString = "Data Source=.;Initial Catalog=Northwind;Integrated Security=True";        using (SqlConnection connection = new SqlConnection(connectionString))        {            using (NorthwindDataContext context = new NorthwindDataContext(connectionString))            {                var query = from c in context.Categories                            select c.CategoryName;                foreach (var title in query)                {                    Response.Write(title);                }            }        }
{#advanced_dlg.about_title}
by Aamir Hasan   on Thursday, November 18, 2010
How to embed flash banner in your asp.net page 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 Wednesday, November 17, 2010
Session variables are stored at server side, by default Session timeout will expire after 20 minutes. We can change the ASP.NET Session timeout in Web.Config and code behind. In this example, i have changed the ASP.NET Session timeout value to 1 hour in the Web.Config Here’s is the solution<configuration>  <system.web>    <sessionState      timeout="60" />  </system.web></configuration>Note: If you have increase ASP.NET Session timeout then you have to increase application idle timeout from Application pool, if Session timeout is greater then Application pool idle timeout then Session will be expire because Application is recycled before session timeout.
{#advanced_dlg.about_title}
by Aamir Hasan   on Friday, November 12, 2010
how to display/hide div element with fading effect using jQuery 1.4.4 More
Advertizement 1
Advertizement 2
Advertizement 3
Advertizement 4
Advertizement 5