asp.net help with if and sql thingies :-)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • glasstap
    New Member
    • May 2006
    • 2

    asp.net help with if and sql thingies :-)

    I'm really strugling with something that should be very basic. I've got an SQL db holding user preference information - 0 for no and 1 for yes

    In the head i have:

    Code:
     <script runat="server" language="VB"> 
    Function general() as String
    IIf question.FieldValue("question_general_info", Container) = "1",Return("<img src='images/check2.gif'>"),Return("<img src='images/delete2.gif'>")
    End If
    End Function
    </script>
    in the body I have:

    Code:
     <% response.write(general()) %>
    And of course it doesn't work.

    Please help

    Craig
    Last edited by Niheel; May 27 '06, 04:48 PM.
  • glasstap
    New Member
    • May 2006
    • 2

    #2
    Did it myself

    Well, unfortunately my question was too silly to be responded to.

    Here is how I overcame it myself. If it's wring it's wrong, but it works.

    string TTUserID = DS_uidAndPwd.Fi eldValue("user_ ID",null);
    string User_Name = DS_uidAndPwd.Fi eldValue("user_ full_name",null );
    int intUserID;
    Session["intUserID"] = Convert.ToInt32 (TTUserID);
    Session["Full_Name"] = User_Name;

    I've posted my solution in case someone else needs help or you may want to show me the error of my ways ;-)

    Comment

    Working...