Genuine problem in ASP .net

Results 1 to 2 of 2

Thread: Genuine problem in ASP .net

  1. #1
    Join Date
    Dec 1969

    Default Genuine problem in ASP .net

    I am constructing a page for Inbox. The page displays messages. Right now I am using Data repeater control. According to the value in the database I want to change the display of the message subject. Say new messages will be displayed with Bold font. The problem is i can not use If else statement in the data repeater.It gives error. Is there any other method to display the contents of the database dynamically.<BR>Another thing I find wrong is there is no recordcount property. what Microsoft&#039;s thinking I don&#039;t know.<BR>In classic ASP the best way is to loop through record set and use if else in between. Should I go for the old way(but what will the use of .net)<BR>Please suggest some way for the problem

  2. #2
    Join Date
    Dec 1969

    Default Helper Functions and Row Numbering

    You&#039;re on the right track you just need to write helper functions to do you If/Else and other repeater logic. Here&#039;s a good link for you.<BR><BR><BR><BR><BR>And here is a helper function that will number your rows for you...<BR><BR>=== Code Behind ===<BR>Protected Function GetIndex(p1 As Object) As String<BR>&#039;iRow = iRow + 1<BR>Return p1 + 1<BR>End Function<BR><BR>=== HTML === where your row #&#039;s will show up<BR>&#060;%# GetIndex(Container.ItemIndex) %&#062;<BR><BR>Hope that helps!<BR><BR>cheers,<BR><BR>Cameron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts