Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 29th, 2008, 12:51 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
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
  #2 (permalink)  
Old October 31st, 2008, 01:44 PM
Registered User
 
Join Date: Oct 2008
Location: , , .
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.