FormEvents_Loading not executing data connection in browser mode.

W

William Leary

I have the following code in my template, which is running in browser mode on
SPS, with Forms Services:

public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
string slnId = String.Empty;

try
{
e.InputParameters.TryGetValue("SlnProgID", out slnId);
}
catch (Exception ex)
{
slnId = ex.Message;
}

XPathNavigator nav = this.MainDataSource.CreateNavigator();

nav.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetSolution/tns:progId",
this.NamespaceManager).SetValue(slnId);

this.DataConnections["getSlnConn"].Execute();
}

I'm trying to pass a parameter to my web service that is the "get" data
connection. When I open this form in non-browser mode (with the
InputParameters line commented out with the slnId variable hardcoded) I see
that my web service does get called.

When I run the browser (uncommented, and expecting parameter) it simply does
not work. I know the code block is being executed becuase I see the
querystring parameter in a text box I have tied to progId field in my data
source.

Any ideas anybody? Is there anything that needs to be done before a call to
Execute() if you're running on the server?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top