MasterPage is just like a Control of a page, You may get the current running page with this code.
public partial class Test_MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
string s = (this.NamingContainer as Page).Request.Url.ToString();
}
}
hope it helps.