ASP.NET question.
This should be simple.
Default.aspx has a number of Web Forms in it.
It calls some javascript.
From the javascript, I want to call Page_Load event in Identify.aspx.
I want Identify.aspx to change the text value of some Web forms that exist in default.aspx
This is what I’ve got so far. I think the problem is the Iframe.src calling the identify.aspx. Is there another way to call identify.aspx file so that it will update web form info that exists in default.aspx?
Three files
Default.aspx – This has this code in it –
<html>
…
<asp:table id=Table1 runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:table>
… </html>
tools.js has this code in it -----
test = document.getElementById("IFrame1");
test.src = "identify.aspx?somvalue=something";
****************
Default.aspx.vb has this code…
Public Class MapPage
Public Shared WithEvents Table1 As System.Web.UI.WebControls.Table
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Table3.Rows(0).Cells(0).Text() = "Test Default"
‘This works. It sets and displays the value to “Test Default”
End sub
End class
*********************
Now, I call a file called identified.aspx It has this code…..
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MapPage.Table1.Rows(0).Cells(0).Text() = "identified"
‘ this does not change the value on the page.
End sub
I can read the value of MapPage.Table1.Rows(0).Cells(0).Text(). It even says it is now set to “identified”. But the form does not change. It is still set to “Test Default”
Is there something I need to do to reset the page?
Is it not possible to dynamically change the value in a Web Form from an aspx.vb?
This should be simple.
Default.aspx has a number of Web Forms in it.
It calls some javascript.
From the javascript, I want to call Page_Load event in Identify.aspx.
I want Identify.aspx to change the text value of some Web forms that exist in default.aspx
This is what I’ve got so far. I think the problem is the Iframe.src calling the identify.aspx. Is there another way to call identify.aspx file so that it will update web form info that exists in default.aspx?
Three files
Default.aspx – This has this code in it –
<html>
…
<asp:table id=Table1 runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:table>
… </html>
tools.js has this code in it -----
test = document.getElementById("IFrame1");
test.src = "identify.aspx?somvalue=something";
****************
Default.aspx.vb has this code…
Public Class MapPage
Public Shared WithEvents Table1 As System.Web.UI.WebControls.Table
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Table3.Rows(0).Cells(0).Text() = "Test Default"
‘This works. It sets and displays the value to “Test Default”
End sub
End class
*********************
Now, I call a file called identified.aspx It has this code…..
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MapPage.Table1.Rows(0).Cells(0).Text() = "identified"
‘ this does not change the value on the page.
End sub
I can read the value of MapPage.Table1.Rows(0).Cells(0).Text(). It even says it is now set to “identified”. But the form does not change. It is still set to “Test Default”
Is there something I need to do to reset the page?
Is it not possible to dynamically change the value in a Web Form from an aspx.vb?