Need some ASP.NET help

Discussion in 'OT Technology' started by Seeders, Mar 26, 2010.

  1. Seeders

    Seeders OT Supporter

    Joined:
    Jul 10, 2007
    Messages:
    3,750
    Likes Received:
    0
    I can't get a function in my code behind file to return anything.

    on my .aspx page i have:

    ...bunch of html...
    <div>
    <%# getSomething() %>
    </div>
    ...rest of html....



    in my codebehind file, i have:

    Function getSomething() As String
    Return "FUCK YOU"
    End Function


    but it never displays anything. i just get an empty div and no error. :o
     
  2. Seeders

    Seeders OT Supporter

    Joined:
    Jul 10, 2007
    Messages:
    3,750
    Likes Received:
    0
    Another question, sorry i'm completely new to ASP.NET:


    I want to build a set of divs based on data i read from some files. Would I write a function to analyze the data, then return a string of the html code i want displayed? Or do I use some kind of container control and set a property to my desired HTML somehow?

    In PHP, i would just have a function call like:

    <div id="mydata">
    <?php
    echo getData(param,param2);
    ?>
    </div>
     
  3. Hate Crime

    Hate Crime Don't Hate OT Supporter

    Joined:
    Mar 12, 2006
    Messages:
    5,255
    Likes Received:
    0
    Location:
    Minnesota
    Some actual code might make this a little easier.
     

Share This Page