Jump to content
Xtreme .Net Talk

customh2

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by customh2

  1. Hey MrNorth, Thanx for the input, however, I do understand the passing of the viewstate (as long as the page is submitted by either Server.Transfer() or by the form action (post)). You can use the Cache.Insert and Cache.Get if your parameters can be set in the program in advance, however, consider the following scenario: You're building a table (kinda like a datagrid) that contains a row for each row in the database, andyou would like to include a button or hyperlink to edit or delete each row in the lefthand column. as you assemble each row of the table, you create a button like: <input type=button value="Edit" onClick="EditRecord(1001)"> or a hyperlink like ... <a href="#" onClick="EditRecord(1001)">Edit</a> You add a little javascript function: function EditRecord(recd_id) { window.open("MyPage.aspx?mode=edit&recd_id=" + recd_id); } The record ID (1001 in this case) is the unique key for the record to be edited, taken from the datatable while assembling the row. You will have no way of knowing in advance which button the user will want to click, so cacheing values won't help. By parsing the query string in MyPage.aspx, you can determine that the user wants to 'Edit' the record with recd_id "1001". Another note: you can append to the window.open URL: "&random=" + Math.Random() This adds a random number to the query string (you can ignore) which forces the client's browser to reload the page instead of retrieving it from cache.:D
  2. Yo, you can try passing these params in the query string... <A HREF=MyApp.aspx?param1=value1&param2=value2>
×
×
  • Create New...