0
我有一個InfoPath表單,它將在SharePoint 2007網站的頁面上的XmlFormView控件中承載代碼隱藏。從XmlFormView中的InfoPath表單訪問URL參數
我將無法在託管XmlFormView的頁面上使用代碼隱藏功能。
有什麼辦法從InfoPath表單的代碼隱藏中訪問當前的HttpContext?
或者有沒有什麼辦法從InfoPath表單的代碼隱藏內部獲取頁面的url中的參數?
我有一個InfoPath表單,它將在SharePoint 2007網站的頁面上的XmlFormView控件中承載代碼隱藏。從XmlFormView中的InfoPath表單訪問URL參數
我將無法在託管XmlFormView的頁面上使用代碼隱藏功能。
有什麼辦法從InfoPath表單的代碼隱藏中訪問當前的HttpContext?
或者有沒有什麼辦法從InfoPath表單的代碼隱藏內部獲取頁面的url中的參數?
那麼,爲什麼你不使用e.InputParameters在FormEvents_Loading事件? 類似的東西:
public void InternalStartup()
{
EventManager.FormEvents.Loading += new LoadingEventHandler(FormEvents_Loading);
}
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
string someGETStringValue= string.Empty;
if (e.InputParameters.TryGetValue("SomeGETStringValue", out someGETStringValue)) {
}
}
另外,請檢查出AHI acticle - LoadingEventArgs.InputParameters Property。 我認爲這會有所幫助。
InputParameters適用於InfoPath Web表單,但不幸的是我無法使其嵌入到XMLFormView中的InfoPath Web表單中。你是否設法使它在XMLFormView中工作? – marapet 2010-10-13 12:57:05