AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 10.07.2009, 17:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Fred Shen: Caller information in EP2009
Источник: http://fredshen.spaces.live.com/Blog...E4E3!272.entry
==============

If we want to get the caller page information in Enterprise portal 2009 which is similar to what we did in AX native client programming -

element.args().caller();

We can implement the following code in the user control:

using Microsoft.Dynamics.Framework.Portal;

...

...

private string GetElementCaller()

{

    string sPath = AxWebSession.GetPreviousURL(this.Page).ToString();

    string [] words = sPath.Split(‘/’, ‘?’);

    string caller = “”;

    foreach (string word in words)

    {

        if (word.Contains("aspx"))

        {

            caller = word;

            break;

        }

    }

    return caller;

}

Add a Label control on the ascx file with ID 'Label1' and put the following code in the Page_Load method

protected void Page_Load(object sender, EventArgs e)

{

   ...

   if (!this.Page.IsPostBack)

   {

      this.Label1.Text = GetElementCaller();

   }

}

You will get the result like ‘EPProjTableInfo.aspx’. 



Источник: http://fredshen.spaces.live.com/Blog...E4E3!272.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Fred Shen: Limited sessions in Axapta Blog bot DAX Blogs 0 28.10.2006 16:40
Fred Shen: Axapta build number Blog bot DAX Blogs 0 28.10.2006 16:40
Fred Shen: Development Features of Dynamics Ax (Axapta) 4.0 Blog bot DAX Blogs 0 28.10.2006 16:40
Fred Shen: Access a method of formDataSource's field Blog bot DAX Blogs 0 28.10.2006 16:40
Fred Shen: Adding covering indexes for aggregate function Blog bot DAX Blogs 0 28.10.2006 16:40

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 19:52.