Simply put: 1 yes, 2 directly: no
Not so easy to put:
1
You can use Initparams to pass multiple (string) parameters
EDIT: If you place the following in your object code on your aspx page:
<param name="InitParams" value="keyOne=valueOne, keyTwo=valueTwo" />
And in your App.cs you add the following to the constructor:
this.Startup += this.Application_Startup;
Then in this function you can go to the init parameter dictionary.
private void Application_Startup(object sender, StartupEventArgs e) { foreach (var data in e.InitParams) { if(data.Key.Equals("keyOne")) {
2: You can use the WCF service to communicate with the server and send and receive data (for example, database data).
EDIT:
This link explains how to host and consume the WCF service (it even explains that hosting is explained in IIS), part of the consumption works the same for WPF, Silverlight, and any other .NET program.
source share