PASS OBJECT FROM FORM TO WEBFORM

0
0
Hi,
Is there any way to pass an object from a form to a webform?. I know that the other way webform->form

example(WEBFORM TO FORM):
    Protected Sub ASPxGridView1_FocusedRowChanged(sender As Object, e As EventArgs) Handles ASPxGridView1.FocusedRowChanged
        Try
            Dim form = CType(FindForm(), Window2)
            Dim grid As ASPxGridView = CType(sender, ASPxGridView)


            form.Datos(grid.GetDataRow(grid.FocusedRowIndex))

        Catch ex As Exception

        End Try
    End Sub

but how i do (FORM TO WEBFORM)?
Exist any FindWebForm or other control (web.aspnetcontrol). there are any example?

thanks
    

  • You must to post comments
0
0

Both AspNetWrapper for ASP.NET controls and the AspNetPanel let the ASP.NET control find the Wisej container using FindPage() or FindForm() allowing it to access the Wisej form or page container. Which is what you are already using, I think.

If you want to access the AspNet control or page from Wisej it’s impossible since the AspNet control doesn’t exist outside of the request/response page lifecycle. ASP.NET creates and destroys all its objects on every request, a click, a submit, a selection – ASP.NET objects do not exist unless there is a postback from the browser. If you save a reference to the ASP.NET object it’s simply a “dead” reference and it will not work.

The only way is for Wisej to save the object you want to pass, then cause a refresh of the AspNetPanel of the AspNetWrapper control and in their Load or Init or PreLoad or PreInit events read the object from the Wisej container.

HTH

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.