Link to home
Start Free TrialLog in
Avatar of riskyricky1972
riskyricky1972

asked on

asp.net c# gridview

i used gridview wizard to create data list and it works fine. However, I want to have make some condition when the gridview is looping. e.g.
when the gridview is running, I want to show if statusid = 1 then hyperlink = "accept" else statusid = 2 show something else...
how can I do that?

500 points for completed working code...

This is asp.net 2.0 c#
Avatar of McExp
McExp
Flag of United Kingdom of Great Britain and Northern Ireland image

sorry, your request is not very clear

do you always want to display a hyperlink but vary the Link text dependant on one of the values from the data source?

or do you want to display a hyperlink if statusid=1 and then some other sort of control if satusid = 2?
ASKER CERTIFIED SOLUTION
Avatar of McExp
McExp
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Both solutions might be valid, one works from declarative code the other from code behind. I think me and the other poster both guessed at solutions as we where unable to get a response from riskyricky1972
Forced accept.

Computer101
EE Admin