i am working on asp.net. i have a problem where i need to conditionally display the data stored in the database. that is, if the value is 1, then Yes and if it is 0, then no.
for this i have written a function. in the fuction, based on the value in the repeater element, i return a tag sequence. like this:
Function populateRadio(input as String) as String
If Int32.Parse(input) = 1 then
Return "<input type=""radio"" name=""textfield8"" id=""textfield8"" value=""1"" checked>Yes</input><br><input type=""radio"" name=""textfield8"" id=""textfield8"" value=""0"">No</input>"
Else
Return "<input type=""radio"" name=""textfield8"" id=""textfield8"" value=""1"">Yes</input><br><input type=""radio"" name=""textfield8"" id=""textfield8"" value=""0"" checked>No</input>"
End If
End Function
this works fine. but the problem occurs when i need to read the data in the radio button for an update query. as it is not an asp control, i am getting an error. Can somebody please help me??
Thanks a lot.
This post has been edited by what2do?: 01 August 2006 - 08:40 AM

New Topic/Question
Reply




MultiQuote





|