Re: ASP.Net VB - framework
How does your current Framework work? is it its own application?
Is it essentially an application that allows you to do various configuration create a form or page, that in the end outputs HTML & JavaScript to create submitable html forms? or does it do more than that?
It sounds like its some sort of designer like that, and i would say that if it is then it will take a fair amount of effort to reproduce.
Its perfectly doable, in fact i have recently been doing a project at work that creates HTML landing Pages inside one of our apps, but so far i have spent 3 months on it and i am about half way through the project. I am doing a full drag and drop designer and code editor so it would take a lot less if you dont need on of those, but even so its not a small project.
Re: ASP.Net VB - framework
yeah similar to that . including drag n drop - although i think that would be more js with the end result thrown to a huge var char or text field.
The main bit is that all the examples so far are using the web form controls. I guess i need to understand how the http request is formed and sent, received and returned and put something in there that forms a response or html or whatever.
Its just... how?
I saw one person had an example using a class, yet in vs2015 i can only add html, js, css, web form... may be i missed something on installation - there were a lot of parts.... :)
so far its request.write("something")... Is that all there is? or do I need a class or two to deal with things?
Re: ASP.Net VB - framework
A simple example might be, if you put a Div on a page and set it to run at server like this -
Code:
<div id="MainDiv" runat="server">
</div>
You can now access that Div (due to the runat server tag) in the code behind and add to it.
So in the code behind -
Quote:
HtmlGenericControl LineDiv = new HtmlGenericControl("Div");
HtmlInputText Textbox = new HtmlInputText();
Label label = new Label();
LineDiv.Controls.Add(label);
LineDiv.Controls.Add(Textbox);
MainDiv.Controls.Add(LineDiv);
Very simply the above code will add a label and textbox to a div, and then add that div to your div on your main page.
You will obviously need to do things like add text to the label -
Code:
label.Text = "SomeText";
you will probably want to add a css class to some of the elements so you can control how they look and there position
Code:
Textbox.Attributes.Add("class", "textbox");
If you add the code behind to a function and call it from you page load, as the page loads it will build your web page
There is lot more you can do but is that the kind of thing your looking for?
If so i can also post on how to add JavaScript functions to your page dynamically and events!
Re: ASP.Net VB - framework
nb - you will need the following using statements at the top of you page -
Code:
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;