Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 29th, 2008, 12:51 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default IF condition in ASP.NET DataList

i was wondering what is the easiest way to put IF conditions in DataLists? I am using C#.

surendran
(Anything is Possible)
http://www.suren.info
http://ssuren.spaces.msn.com
__________________
surendran
(Anything is Possible)
http://www.suren.info
http://ssuren.spaces.msn.com
 
Old October 31st, 2008, 01:44 PM
Registered User
 
Join Date: Oct 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
  You can use "ItemCommand" event of datatlist like this
protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
{

  if (e.CommandName == "MyCommand")
   {
          //Your logic
   }
}

Hope this will help you

Pankaj
www.dotnetspark.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
New Install of ASP.Net Won't Display DataList scott.ferguson ASP.NET 1.0 and 1.1 Basics 5 January 12th, 2007 05:21 AM
DataList ItemCommand event problem in ASP.NET page naidukap ASP.NET 1.0 and 1.1 Professional 0 December 26th, 2005 03:26 AM
DataList Is not showing Data using ASP.NET and C# kmazumdar ADO.NET 5 August 20th, 2004 10:18 AM
.NET setup project launch condition irene_yip General .NET 0 February 25th, 2004 06:18 AM
clear items in asp.datalist jtyson Classic ASP Basics 0 July 10th, 2003 12:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.