Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Inline code clock calling method with page reference

Reply
Thread Tools

Inline code clock calling method with page reference

 
 
Robert H
Guest
Posts: n/a
 
      07-26-2006

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Master Page methods directly from Content Page inline code(.aspx file) DevNll2002@gmail.com ASP .Net 1 04-09-2008 12:51 AM
Passing a method(reference) to an other method and calling themethod. Erik Java 11 03-29-2008 07:26 AM
External inline functions calling internal inline functions Daniel Vallstrom C Programming 2 11-21-2003 01:57 PM
inline code VS page behind code Mitch A ASP .Net 3 11-02-2003 12:55 AM
Are clock and divided clock synchronous? Valentin Tihomirov VHDL 11 10-28-2003 01:18 PM



Advertisments