CALL SERVER FUNCTION IN SERVER TAG

Ashish Pandey

Total Post:128

Points:898
Posted by  Ashish Pandey
 892  View(s)
Ratings:
Rate this:

Can I call my function inside my server tag?

public string Mytext()

{

}

And

<asp:Label ID="lbl" runat="server" Text="Mytext()"><asp:Label>

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: Call server function in server tag

    Hi Ashish, 


    Yes, using Expression syntax, e.g.,

    <asp:Label ID="lbl" runat="server" Text="<%$ Mytext() %>"><asp:Label>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!