Hi Richard,
Before writing the code to do this you should know that yoou wont be able to update the VWG client side with the value that you get form aspx page because there is no VWG event that was raised from the client. But this functionality wll be added in the futer.
Ok this is the code you need in the aspx page
{
VWG.Events.SetEventAttribute(objEvent,
VWG.Events.RaiseEvents();
}
<script>function SendText(strMessage)var objEvent = VWG.Events.CreateEvent("<%= PageContext.Guid %>","TextBoxText");"message",strMessage);</script>
And on the button click
<button onclick="SendText(document.getElementById('TextBox1').value)">Raise event to VWG</button>
This will raise an event in the Aspx pag4e.
Next we will create our own AspxBox like this
public class MyAspPageBox : AspPageBox
{
protected override void FireEvent(Gizmox.WebGUI.Common.Interfaces.IEvent objEvent)
{
base.FireEvent(objEvent);
if (objEvent.Type == "TextBoxText")
{
string value = objEvent["message"];
}
}
}
This will get the value to the VWG application and you can use it but if you want to update the value to see it the UI you will have to wait to an event from the user in the VWG part.
Hope this helps.
Eyal Albert