Reputation: 1288
I'm building a system which can create forms during runtime. System is written for WinForms and works well for creation of Windows forms and reports. Forms are written to the database as XML.
Now I want to extend that principle to web domain. On Default.aspx for example I plan to put placeholder and write code for creation of web controls.
The question that bugs me is - how can I open such web page from my WinForms appliaction? I need to open it in default browser and transmit ID to it.
The sequence is this - Design the form, save it to database, open a web page with form rendered on it.
Upvotes: 1
Views: 168
Reputation: 3523
Ok so taking the trival example of saving a form to the DB it will get an ID.
You can then have an ASP.Net page that expects to be passed a param on the QS of formid=1
so
http://yoursite/formbuilder.aspx?formid=1
Within your page you can then check if that id is passed in on the querystring and create the form that way.
To open the browser you can do something similar to this
System.Diagnostics.Process.Start("http://<yoursite>/formbuilder.aspx?formid=1");
Upvotes: 1