Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the value of a Table Cell with an aspx.vb Sub procedure call

Status
Not open for further replies.

sabev

Programmer
Sep 27, 2002
47
US
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?


 
What version of the .NET framwork are you using? How are you getting a refernce to the mappage page. If it compiles and runs, then you need to do a postback on mappage.aspx. Not sure why are you doing this.

Jim
 
.NET 1.1

I do think I somehow have to do a postback. That's what I can't figure out.

I'm doing this because I want to dynamically update values on in a client table with data pulled with VB.NET from the server side.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top