Ramani Sandeep – ASP.NET

Help for .NET Developer

Important Silverlight Tutorials for Beginners

Technorati Tags:

Important FAQ questions for WPF and SilverLight:

  • What is the need of WPF when we had GDI, GDI+ and DirectX?
  • How does hardware acceleration work with WPF?
  • Does that mean WPF has replaced DirectX?
  • So can we define WPF in a precise way?
  • What is XAML?
  • So is XAML meant only for WPF ?
  • Can you explain the overall architecture of WPF?
  • Which are the different namespaces and classes in WPF ?
  • Can explain the different elements involved in WPF application practically?
  • What are dependency properties?
  • Are XAML file compiled or built on runtime?
  • Can you explain how we can separate code and XAML?
  • How can we access XAML objects in behind code?
  • What kind of documents are supported in WPF?
  • What is SilverLight ?
  • Come on, even WPF runs under browser why SilverLight ?
  • Can SilverLight run in other platforms other than window?
  • What is the relationship between Silver Light, WPF and XAML?
  • Can you explain SilverLight architecture?

             click here to read more ……

 

SilverLight FAQ part 2 (Animations and Transformations)

  • What is the definition of animation from Silver light perspective?
  • What is a timeline in Silver light?
  • What are the different kinds of animation supported by Silverlight?
  • Can you explain doubleanimation , coloranimation and pointanimation ?
  • What is a story board?
  • Can we see a simple silverlight animation to just get started?
  • What are the different ways in which silver light does transformation?
  • Silverlight VS Flash good news and bad news

         click here to read more…

 

SilverLight’s FAQ – Part 3

    Technorati Tags:
  • Can you explain one way and two way bindings?
  • Can you explain One time binding?
  • Can you demonstrate a Simple example of OneWay and TwoWay?
  • What are the different ways provided to do layout in SilverLight?
  • Can you explain how Canvas layout actually works?
  • How can we implement Grid Layout?
  • How can we implement Stack Layout?
  • What are the different steps involved in consuming WCF service in Silverlight?
  • Why can’t we consume ADO.NET directly in SilverLight?
  • How can we do database operation using SilverLight?

        click here to read more…

July 3, 2009 Posted by ramanisandeep | Silverlight | | No Comments Yet

How do we create,Read,Delete Cookies in Asp.net

A cookie is a small bit of text file that browser creates and stores on your machine (hard drive). Cookie is a small piece of information stored as a string. Web server sends the cookie and browser stores it, next time server returns that cookie.Cookies are mostly used to store the information about the user. Cookies are stores on the client side.

Here i m going to explain you by providing example of Remember me Code :

Step 1 : if check box is checked for “Remember Me” then create cookie else Delete it.

if (chkRememberMe.Checked == true)
                    {
                        //Create Cookie to Store AdminInfo
                        HttpCookie aCookie = new HttpCookie("AdminInfo");
                        aCookie.Values["userName"] = txtUsername.Text;
                        aCookie.Values["Password"] = txtPassword.Text;
                        aCookie.Values["lastVisit"] = DateTime.Now.ToString();
                        aCookie.Expires = DateTime.Now.AddDays(10);
                        Response.Cookies.Add(aCookie);
                    }
                    else
                    {
                        //Delete Cookie
                        HttpCookie aCookie = new HttpCookie("AdminInfo");                       
                        aCookie.Expires = DateTime.Now.AddDays(-1);
                        Response.Cookies.Add(aCookie);
                    }

Step 2 : now check cookie is null or not in page load event & set username & password from cookie

protected void Page_Load(object sender, EventArgs e)
   {
       if (!IsPostBack)
       {
           if (Request.Cookies["AdminInfo"] != null)
           {
               txtUsername.Text = Request.Cookies["AdminInfo"]["userName"] == null ? null : Request.Cookies["AdminInfo"]["userName"].ToString();
               string pwd = Request.Cookies["AdminInfo"]["Password"] == null ? null : Request.Cookies["AdminInfo"]["Password"].ToString();
               txtPassword.Attributes.Add("value", pwd);
           }
       }

   }

 

Technorati Tags:

July 3, 2009 Posted by ramanisandeep | ASP.NET | | No Comments Yet

Spell Checker Configuration with FCK Editor

Technorati Tags:

FCKeditor comes with built-in integration with two spell checkers: ieSpell and Speller Pages. Here you will find information about these spell checkers and how to configure them.

    ieSpell

As the name says, ieSpell is an extension for Internet Explorer that does spell checking at the client side. It is quite simple and efficient, but it runs on IE/Windows only.

To use ieSpell just set the following configuration in fckconfig.js or in your own Configuration File:

    FCKConfig.SpellChecker = ‘ieSpell’ ;

The first time a user runs the Spell Checker, he/she will be automatically informed that ieSpell is not installed and will be redirected to the download URL (the URL can also be configured using IeSpellDownloadUrl option).

When running FCKeditor with ieSpell with non-IE browsers, the "Check Spell" button will be automatically disabled.

NOTE: ieSpell is free for personal use. Commercial licenses are available for very low prices. For more info about ieSpell, its licensing, configurations and more, go to http://www.iespell.com/.

   Speller Pages

Speller Pages is a free, Open Source, server side spell checker that uses the powerful GNU Aspell engine for the hard work. This should be the preferred spell checker, but it requires some server side configuration (this is why it is not set as the default one).

To use Speller Pages just set the following configuration in fckconfig.js or in your own Configuration File:

   FCKConfig.SpellChecker = ‘SpellerPages’ ;

FCKeditor uses a customized version of Speller Pages, so any specific configuration must be done in the files found at: editor/dialog/fck_spellerpages/spellerpages. All changed lines have been marked with a "by FredCK" comment.

The files included in the package are set to run over Windows with PHP. Useful information about Windows configuration can be found here: Installation Instructions.

If the server is not Windows just go to to the spellerpages/server-scripts directory, locate the appropriate file and adjust the var that holds the path to the aspell binary.

For more info about Speller Pages, its licensing, installation, configuration and more, go to http://spellerpages.sourceforge.net/.

Reference Site :  http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Spell_Checker

June 30, 2009 Posted by ramanisandeep | ASP.NET | | 1 Comment

Send Email with Inline Images & Attachments

When sending an email from an ASP.NET 2.0 page you will, typically:

1. Create a MailMessage object
2. Assign its properties
3. Create an instance of the SmtpClient class
4. Specify details about the SMTP server to use (if they’re not already specified within Web.config)
5. Send the MailMessage via the SmtpClient object’s Send method

ASP.NET makes it easy to utilise e-mail in an application with the System.Web.Mail namespace. Let’s take a closer look at putting this namespace to work in your applications.

System.Web.Mail namespace
The Microsoft documentation provides a good overview of the System.Web.Mail namespace. It’s composed of classes that allow you to create and send messages using the Collaboration Data Objects for Windows 2000 (CDOSYS) message component. The actual message may be delivered via the SMTP (Simple Mail Transfer Protocol) mail service built into Microsoft Windows 2000 and beyond or through an arbitrary SMTP server. The classes in this namespace aren’t restricted to an ASP.NET application.

The namespace includes three classes:

  • MailAttachment: Provides properties and methods for constructing an e-mail attachment.
  • MailMessage: Provides properties and methods for constructing an e-mail message.
  • SmtpMail: Provides properties and methods for sending messages using the CDOSYS message component.

MailAttachment class

The basic approach is the creation of a MailMessage object followed by sending it on its way via a SmtpMail object. The MailMessage class contains numerous methods and properties for working with an e-mail message. Properties such as From, Subject, and Body provide everything you need to create an e-mail message, but a SmtpMail object is still necessary for sending it on its way.

SmtpMail class

The SmtpMail class includes the SmtpServer property that gets or sets the name of the SMTP relay mail server to use to send messages, and the Send method actually sends the message. The Send method is overloaded. It allows a message to send using two approaches:

1. A MailMessage object is passed to the SmtpServer object. Four string objects may be passed to the SmtpServer object with the first being the From field followed by the Recipient, Subject, and the message’s Body.

2. You’ll use the MailAttachment and SmtpMail classes together to create the necessary messages in your application, but make sure the Web server is properly configured to send a message via SMTP. Since IIS (Internet Information Services) is the most popular platform for ASP.NET applications, go ahead and use both the IIS and SMTP services to send messages from your application.

Using SMTP with IIS

You can set up both IIS and SMTP services via the Windows control panel. The SMTP service’s role is to accept and deliver the messages using the server’s configuration. It may deliver the messages directly, or utilise a smart host to deliver the message instead. When a smart host is enlisted, all messages are forwarded to it for delivery.

A little more information is appropriate for debugging. The SMTP service uses a directory structure to contain messages prior to delivery with the default directory being C:\Inetpub\mailroot. It contains numerous subdirectories including Queue, Drop, and Badmail. If you’re unable to configure your instance of the SMTP Service for delivery, you can find the message in an EML file in the Queue subdirectory. The Badmail directory contains messages that that couldn’t be delivered. Now, let’s take a look at sending mail messages from your code.

Sending e-mail messages

To compose an e-mail message in your code, you need to start by creating an instance of the MailMessage class, as shown in the following C# snippet:

MailMessage msg = new MailMessage();

Be sure to include the System.Web.Mail namespace in your code:

using System.Web.Mail;

Once the object is instantiated, the various properties of the MailMessage class are used per your application. The following lines set the recipient, sender, and subject of the message:

msg.To = “test@test.com”;
msg.From = “me@test.com”;
msg.Subject = “Test Message”;

The next step is setting our mail server via the SmtpServer object’s SmtpServer property:

SmtpMail.SmtpServer = “smtp server name or address”;

The final step is sending the message by passing our MailMessage object to the SmtpMail object’s Send method:

SmtpMail.Send(msg);

Here I am Providing you the Complete Example of how to send Email with Inline Image / Multiple Attachments …etc…

—————————————-
Button Event Code
—————————————-

protected void Button1_Click(object sender, EventArgs e)
{
string from = “”, to = “”, cc = “”, subject = “”, body = “”, attachedfiles = “”;

from = “sandeep@gmail.com”;
to = “yogesh@gmail.com;sandeep@
gmail.com”; // multiple entry are separated bt ‘;’
cc = “jagat@
gmail.com”;
subject = “Testing Email Module”;

//Read Mail Template
StreamReader sr;
StringBuilder sb = new StringBuilder();
string BodyOfMail = “”;
sr = File.OpenText(Server.MapPath(”~/MailTemplate.txt”));
sb.Append(sr.ReadToEnd());
body = sb.ToString();

//attachments
attachedfiles = “E:\\Images\\1.jpg;E:\\Images\\2.jpg;”;
emailClass.SendEmail(from, to, cc, subject, body, attachedfiles);
}

—————————————-
MailTemplate.txt
—————————————-

<html >
<head>

<title>Untitled Document</title>

</head>
<body>
<form id=”form1″ name=”form1″ method=”post” action=”">
<table width=”100%” border=”0″ cellspacing=”10″ cellpadding=”10″>
<tr>
<td bgcolor=”#FFFFFF”>
<br />
<table width=”550″ border=”0″ cellpadding=”2″ cellspacing=”0″ bordercolor=”#FFFFFF”
id=”Comment Table2″>
<tr>
<td >
Hello Friend Name,<br />
<br />
Your friend has been send you this offer.
<br />
</td>
</tr>

<tr>
<td align=”right”>

<table width=”530″ border=”0″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td >
<img src=”{images/logo1.jpg” />
</td>
<td >
<img src=”{images/logo2.jpg”  />
</td>
</tr>
</table>

</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>

—————————————-
emailClass Class
—————————————-

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
using System.Net;

/// <summary>
/// Summary description for emailClass
/// </summary>
public class emailClass
{
public emailClass()
{
//
// TODO: Add constructor logic here
//
}
public static void SendEmail(string from, string to, string cc, string subject, string body, string attachedFiles)
{
try
{
MailMessage mailMsg = new MailMessage();
SmtpClient mailObj = new SmtpClient(”server”, 25);//”192.168.0.17″ – SmtpClient

//to authenticate we set the username and password properites on the SmtpClient
mailObj.Credentials = new NetworkCredential(”sandeep@
gmail.com”, “password”);

mailMsg.From = new MailAddress(from);

string[] temp = to.Split(’;');
for (int i = 0; i < temp.Length; i++)
{
if (temp[i].ToString().Length > 1)
mailMsg.To.Add(temp[i].ToString());
}

temp = cc.Split(’;');
for (int i = 0; i < temp.Length; i++)
{
if (temp[i].ToString().Length > 1)
mailMsg.CC.Add(temp[i].ToString());
}
temp = attachedFiles.Split(’;');
for (int i = 0; i < temp.Length; i++)
{
if (temp[i].ToString().Length > 1)
mailMsg.Attachments.Add(new Attachment(temp[i].ToString()));
}

mailMsg.Subject = subject;
mailMsg.Body = body;
mailMsg.IsBodyHtml = true;
int count = 0;
string oldChar = ExtractImages(body, ref count);
Random RGen = new Random();
while (oldChar != “”)
{
string imgPath = oldChar;
int startIndex = imgPath.ToLower().IndexOf(”images/”);
if (startIndex > 0)
{
imgPath = imgPath.Substring(startIndex);
imgPath = imgPath.Replace(”/”, “\\”);
System.Net.Mail.Attachment A = new Attachment(HttpContext.Current.Request.PhysicalApplicationPath + “\\” + imgPath);
A.ContentId = RGen.Next(100000, 9999999).ToString();
body = body.Replace(oldChar, “cid:” + A.ContentId);
mailMsg.Attachments.Add(A);
oldChar = ExtractImages(body, ref count);
}
else
{
oldChar = ExtractImages(body, ref count);
}
}
mailMsg.Body = body;
mailObj.Send(mailMsg);
}
catch (Exception ex)
{
System.Web.HttpContext.Current.Response.Write(ex.Message);
}
}

private static string ExtractImages(string body, ref int count)
{
int startIndex = body.ToLower().IndexOf(”<img src=\”", count);
int endIndex;
if (startIndex >= 0)
{
endIndex = body.IndexOf(”\”", startIndex + 10);
}
else
{
return “”;
}
startIndex = startIndex + 10;
string imgurl = body.Substring(startIndex, (endIndex – (startIndex)));
count = startIndex;
return imgurl;
}
}

ASP.NET makes it easy to utilise e-mail in an application with the System.Web.Mail namespace. Let’s take a closer look at putting this namespace to work in your applications.

System.Web.Mail namespace
The Microsoft documentation provides a good overview of the System.Web.Mail namespace. It’s composed of classes that allow you to create and send messages using the Collaboration Data Objects for Windows 2000 (CDOSYS) message component. The actual message may be delivered via the SMTP (Simple Mail Transfer Protocol) mail service built into Microsoft Windows 2000 and beyond or through an arbitrary SMTP server. The classes in this namespace aren’t restricted to an ASP.NET application.

The namespace includes three classes:

  • MailAttachment: Provides properties and methods for constructing an e-mail attachment.
  • MailMessage: Provides properties and methods for constructing an e-mail message.
  • SmtpMail: Provides properties and methods for sending messages using the CDOSYS message component.

MailAttachment class
The basic approach is the creation of a MailMessage object followed by sending it on its way via a SmtpMail object. The MailMessage class contains numerous methods and properties for working with an e-mail message. Properties such as From, Subject, and Body provide everything you need to create an e-mail message, but a SmtpMail object is still necessary for sending it on its way.

SmtpMail class
The SmtpMail class includes the SmtpServer property that gets or sets the name of the SMTP relay mail server to use to send messages, and the Send method actually sends the message. The Send method is overloaded. It allows a message to send using two approaches:

A MailMessage object is passed to the SmtpServer object. Four string objects may be passed to the SmtpServer object with the first being the From field followed by the Recipient, Subject, and the message’s Body.

You’ll use the MailAttachment and SmtpMail classes together to create the necessary messages in your application, but make sure the Web server is properly configured to send a message via SMTP. Since IIS (Internet Information Services) is the most popular platform for ASP.NET applications, go ahead and use both the IIS and SMTP services to send messages from your application.

Using SMTP with IIS
You can set up both IIS and SMTP services via the Windows control panel. The SMTP service’s role is to accept and deliver the messages using the server’s configuration. It may deliver the messages directly, or utilise a smart host to deliver the message instead. When a smart host is enlisted, all messages are forwarded to it for delivery.

A little more information is appropriate for debugging. The SMTP service uses a directory structure to contain messages prior to delivery with the default directory being C:\Inetpub\mailroot. It contains numerous subdirectories including Queue, Drop, and Badmail. If you’re unable to configure your instance of the SMTP Service for delivery, you can find the message in an EML file in the Queue subdirectory. The Badmail directory contains messages that that couldn’t be delivered. Now, let’s take a look at sending mail messages from your code.

Sending e-mail messages
To compose an e-mail message in your code, you need to start by creating an instance of the MailMessage class, as shown in the following C# snippet:

MailMessage msg = new MailMessage();

Be sure to include the System.Web.Mail namespace in your code:

using System.Web.Mail;

Once the object is instantiated, the various properties of the MailMessage class are used per your application. The following lines set the recipient, sender, and subject of the message:

msg.To = “test@test.com”;
msg.From = “me@test.com”;
msg.Subject = “Test Message”;

The next step is setting our mail server via the SmtpServer object’s SmtpServer property:

SmtpMail.SmtpServer = “smtp server name or address”;

The final step is sending the message by passing our MailMessage object to the SmtpMail object’s Send method:

SmtpMail.Send(msg);

June 18, 2009 Posted by ramanisandeep | ASP.NET | , , , , , | No Comments Yet

Print in ASP.NET 2.0

Option 1 : Using ASP.NET (C# / VB )

One of the most common functionality in any ASP.NET application is to print forms and controls. There are a lot of options to print forms using client scripts. In the article, we will see how to print controls in ASP.NET 2.0 using both server side code and javascript.

Click here to read more…..

Option 2 : Using Javascript

In the article, we will see how to print controls in ASP.NET 2.0 using javascript.


Option 3 : Printing a GridView with Paging


This is a WebControl that provides an easy way to prepare an ASP.NET GridView to be paged and printed in the browser.


Click here to read more…..

May 19, 2009 Posted by ramanisandeep | ASP.NET, JavaScript | , , | No Comments Yet

How to play music in background

I want to create noisy websites. All of our desktop applications make sounds. It seems completely unfair that our websites are so quiet.


Methods are:

  1. <bgsound> tag
  2. <embed> tag
  3. <object> tag

1. <bgsound> tag

Here’s how you add sound with the <bgsound> tag:

<bgsound src=”test.wav” />

The <bgsound> tag is the tag that gave sound a bad name. This is the tag that everyone adds to their websites to create the endlessly looping background music. The <bgsound> tag was introduced into the world (in the same month) with the release of Microsoft Internet Explorer 2.0 and Mosaic 2.1. Opera supports the <bgsound> tag, but Firefox does not.

Since the <bgsound> was never incorporated into any web standards (you won’t find any mention of the tag in either the HTML or XHTML standards), most web authors avoid this tag as outdated and dead. Typically, you are encouraged not to use the <bgsound> tag in favor of either the <embed> or <object> tag.

However, I use the <bgsound> sound tag in the Javascript that I develop at the end of this post. There is one very important advantage of the <bgsound> tag. The <bgsound> tag does not cause the information bar to popup in Internet Explorer when you use this tag in a page.

The Internet Explorer version of this tag has four important properties:
•   Balance – Enables you to specify the balance between the left and right speaker
•    Loop – Enables you to specify the number of times that the sound will repeat. The value -1 means loop infinitely
•    Src – Enables you to specify the URL to the sound file
•    Volume – Enables you to specify the volume of the sound (valid values range from -10,000 to 0)


2. <embed> tag

Here’s how you use the <embed> tag:

<embed src=”test.wav” type=”audio/x-wav” />

The src attribute points to the sound file and the type attribute specifies the MIME type of the file. Notice that the MIME type of a .wav sound file is indicated with the MIME type audio/x-wav. The x means that .wav is a custom type. Using the x is necessary because the .wav sound file format does not have a registered MIME type at IANA.

The <embed> tag is not limited to sounds. You can use the <embed> tag to embed a variety of different types of objects in a page including videos and pictures.

There’s no master list of valid attributes for the <embed> tag. Different types of objects that you embed in a document will support different attributes. For example, on my computer, Windows Media Player is mapped to the .wav extension. Therefore, I can use Windows Media Player attributes with the <embed> tag.

One problem with using the <embed> tag is that you must have an application mapped to the type of file being downloaded. Unfortunately, on my computer, there was no application mapped to the .wav extension by default. When I initially requested a page that contained an embedded .wav file, I got the Internet Explorer information bar.

Since I don’t want to inflict the Internet Explorer information bar on users when playing sounds, I don’t use the <embed> tag in the Javascript at the end of this article. The <bgsound> element enables us to play .wav files without displaying the information bar.

3. <object> tag

The <object> tag is very similar to the <embed> tag. It allows you to embed objects in a page like this:

<object data=”test.wav” type=”audio/x-wav” />

Notice that the <object> tag uses the data attribute and not the src attribute to point to a file.

The difference between the <embed> tag and the <object> tag is that the latter tag is supported by W3C web standards. If creating standards compliant websites is important to you, then you should use this tag.

Just like in the case of the <embed> tag, there is no master list of attributes for the <object> tag. The list of valid attributes all depends on the application or plug-in being used to display the embedded object.

Unfortunately, when used with Internet Explorer, the <object> tag causes the Internet Explorer information bar to popup just like the <embed> tag. In the Javascript at the end of this article, I use the <bgsound> tag for Internet Explorer and the <object> tag for every other browser.

Generating Sounds with Javascript

PlaySound.js

if (window.attachEvent)
window.attachEvent(”onload”, setupPlaySound);
else
window.addEventListener(”load”, setupPlaySound, false);

function setupPlaySound()
{
if (navigator.appName == “Microsoft Internet Explorer”)
{
var snd = document.createElement(”bgsound”);
document.getElementsByTagName(”body”)[0].appendChild(snd);

playSound = function(url)
{

snd.src = url;
}
}
else
{
playSound = function(url)
{
var obj = document.createElement(”object”);
obj.width=”0px”;
obj.height=”0px”;
obj.type = “audio/x-wav”;
obj.data = url;

var body = document.getElementsByTagName(”body”)[0];
body.appendChild(obj);
}
}
}

The first lines of the Javascript create an event handler for the browser window load event. Internet Explorer uses the attachEvent() method to create an event handler and other browsers use the addEventListener() method.

The setupPlaySounds() method is called after the window is loaded. This method creates the playSound() method. Javascript enables you to conditionally create different versions of a function. There is one version of the playSound() method that is created in the case of Internet Explorer and another version that is created in the case of every other browser.

The Internet Explorer version of the playSound() method takes advantage of the <bgsound> tag to play a sound. The alternative playSound() method takes advantage of the <object> tag. If you link the Javascript file above into an ASP.NET page, then you can play a sound by calling the playSound() method and passing the URL of a sound file. You can link the PlaySound.js file to an ASP.NET page by adding the following tag to the page:

<script type=”text/javascript” src=”PlaySound.js”></script>
And, adding the following link to a page will cause the sound file ClickHere.wav to play whenever you hover your mouse over the link.
<a href=”SomePage.htm” onmouseover=”playSound(’ClickHere.wav’)”>Click Here!</a>
The playSound() method works with recent versions of Internet Explorer, Firefox, and Opera.

May 13, 2009 Posted by ramanisandeep | ASP.NET | | No Comments Yet

Deploying a Crystal Reports Application to a Remote Server

When deploying a Crystal Reports application written in ASP.NET, must the remote server have the Crystal Reports .NET server components installed? Ben Higgins from the ORCS Webteam addresses a common misconception.

To Read More….


Click Here

May 13, 2009 Posted by ramanisandeep | Crystal Reports | , | No Comments Yet

How to call a function from .aspx.cs file to .aspx file

Hi, U can use the .cs side function in .aspx side something below given method

I have created the following method in .cs side

public int GetNoOfForums(int groupId)
{
ForumCollection forums = new ForumCollection();
return forums.GetNoOfForums(groupId);
}

After that we call that method in  .aspx  something like below.

<asp:DataList ID=”dlstGroup” runat=”server” OnItemCommand=”dlstGroup_ItemCommand”
OnItemDataBound=”dlstGroup_ItemDataBound” >
<HeaderTemplate>
<tr>
<th>
<b>Created By</b>
</th>

<th style=”font-weight: bold;”>
No. of Forums
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td align=”left”>
<%#Eval(”CreatedByUserName”) %>
</td>
<td align=”left”>
<asp:Label ID=”lblStatus” runat=”server” Text=’ <%#Eval(”Status”) %>’></asp:Label>
</td>
<td align=”center”>
<%#GetNoOfForums(Convert.ToInt32(Eval(”GroupID”)))%>
</td>

</tr>
</ItemTemplate>
</asp:DataList>

May 13, 2009 Posted by ramanisandeep | ASP.NET | , , | No Comments Yet

Building a Type-Ahead Dropdown Control

The ASP.NET DropDownList control does not offer type-ahead functionality. Often users have to scan through hundreds of items before making a selection. This article shows how to easily implement type-ahead functionality in a dropdown that will be a hit with your users.



Read more ……

April 29, 2009 Posted by ramanisandeep | ASP.NET | , | No Comments Yet

Two-way data binding in 3-Tier web application

In this article I would like to examine two-way data-binding in 3-tier web application and how using XLib library can substantially decrease the amount of data-binding code without compromising the amount of control you have over it. I start by describing the ways data flow has been handled in 3-tier applications and how XLib improves upon it.

Read More…

April 24, 2009 Posted by ramanisandeep | .Net Framework, ASP.NET | | No Comments Yet