ASP.NET Webpart basic sample

Tuesday, October 6, 2009

<h4>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:WebPartManager ID="WebPartManager1" runat="server">
</asp:WebPartManager>
<table>
<tr>
<td>
<asp:WebPartZone ID="MainZone" runat="server" HeaderText="My WebPart Zone">
<ZoneTemplate>
<asp:Label ID="Label1" runat="server" Title="Content">
<h2>Welcome to my Webparts world</h2>
</asp:Label>
</ZoneTemplate>
</asp:WebPartZone>
</td>
</tr>
</table>
</form>
</body>
</html>



</h4>

<a href="http://www.codecollege.NET">www.codecollege.NET</a>

LINQ Basic Sample with arrays


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LINQSamp1
{
class Program
{
static void Main()
{
int[] ages = { 47, 45, 53, 57,44,63,66 };
IEnumerable seniorcitizen =
from n in ages
where n >50
select n;
foreach (var x in seniorcitizen)
Console.Write("Senior Citizen aged:{0}\n", x);
Console.Read();
}
}
}




www.codecollege.NET

How will you end an asynchronous call with a delegate?


EndInvoke



www.codecollege.NET

How will you start an asynchronous call with a delegate?


BeginInvoke



www.codecollege.NET

What are the standard patterns for asynchronous methods calls?


1. Wait Until Done
2. Polling
3. Callback



www.codecollege.NET

When a program wants to retrieve the results of the completed asynchronous method,Which property will it check?


IsCompleted.



www.codecollege.NET

What is the expansion of DLR?


Dynamic language Runtime.



www.codecollege.NET

How will you make Visual Studio write the code for #region #endregion automatically ?


Type a , select '#region', Press Tab twice.



www.codecollege.NET

How will you make Visual Studio write the code for default destructor or finalizer automatically ?


Type ~ , Press Tab twice.



www.codecollege.NET

How will you make Visual Studio write the code Console.WriteLine automatically ?


Type cw ,Press Tab twice.



www.codecollege.NET

How will you make Visual Studio write the code for default constructor automatically ?


Type ctor , Press Tab twice



www.codecollege.NET

LinkWithin

Blog Widget by LinkWithin

Recommended Books