dontspeak
پنج شنبه 29 اردیبهشت 1390, 22:18 عصر
سلام چطور میتونم به اسم یه صفحه در code-behind دسترسی داشته باشم؟ کدش چیه؟
dontspeak
پنج شنبه 29 اردیبهشت 1390, 22:36 عصر
دوستان ممنون پیدا کردم 
public static string GetCurrentPageName()
    {    
            string sPath = HttpContext.Current.Request.Url.AbsolutePath;
            string[] strarry = sPath.Split('/');
            int lengh = strarry.Length;
            string sRet = strarry[lengh - 1];
            return sRet;
    }
Peyman.Gh
جمعه 30 اردیبهشت 1390, 14:03 عصر
ساده تر هم میتوان این کار را انجام داد.
Response.Write(System.IO.Path.GetFileName(Request. Url.AbsolutePath));
موفق باشید.
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.