Inline code clock calling method with page reference

Discussion in 'ASP .Net' started by Robert H, Jul 26, 2006.

  1. Robert H

    Robert H Guest

    Hello, I am wondering if it would be possible to call a method in a
    class passing a reference to the page. Example:

    ( code behind same namespace )
    public class Util {
    public static string getURL(System.Web.UI.Page p){
    try {return "page.aspx?name=" + p.Session["fname"] + " " +
    p.Session["lname"];}
    catch{return "";}
    }
    }

    then in the aspx page trying to use this code block.
    <%=Util.getURL(this.Page)%>

    thanks all,
    Rob
    Robert H, Jul 26, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Valentin Tihomirov

    Are clock and divided clock synchronous?

    Valentin Tihomirov, Oct 23, 2003, in forum: VHDL
    Replies:
    11
    Views:
    3,283
    louis lin
    Oct 28, 2003
  2. Replies:
    4
    Views:
    713
    Peter Alfke
    Apr 27, 2006
  3. Replies:
    5
    Views:
    2,156
    Ricardo
    Jun 23, 2006
  4. Daniel Vallstrom
    Replies:
    2
    Views:
    1,875
    Kevin Bracey
    Nov 21, 2003
  5. Replies:
    1
    Views:
    1,284
Loading...

Share This Page