Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capture a prior form value
Message
 
 
To
14/05/2008 12:44:18
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01317012
Message ID:
01317062
Views:
8
>See my response to Bruce. I have the Session method working but it seems like a clumsey way to make control values available to a subsequent page. If the first page was full of lots of controls, would we have to create a session variable for each one of them? Isn't that what the request object is for? I just don't know the syntax for it in .NET.
>

Another way would be to have everything on one page. You may have MultiView control or if you're using AJAX you can have tab control that will show GridView on one page and when you select a record you can switch to full record detail information.

>>This is one more sample of passing some ID to another page as a QueryString
>>
>>Response.Redirect("fcPhotoGallUpload.application?siteid=" + Profile.SiteID.ToString());
>>
>>Session way is more secure.
>>
>>>Found some sample for the first part, though now I see that it's a very strange code (I haven't written it)
>>>
>>>        protected void SelectedIndexChanged(object sender, EventArgs e)
>>>        {
>>>
>>>            String ProgramID = this.GridView2.Rows[GridView2.SelectedIndex].Cells[0].Text;
>>>
>>>            ProgramID = this.GridView2.Rows[GridView2.SelectedIndex].Cells[1].Text;
>>>
>>>
>>>            ProgramID = this.GridView2.Rows[GridView2.SelectedIndex].Cells[2].Text;
>>>
>>>
>>>>OK, how do you do that?
>>>>Like I said, I'm a total newbie.
>>>>Currently I have this in the gridview select
>>>>
>>>>    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
>>>>        Response.Redirect("edituser.aspx")
>>>>    End Sub
>>>>
>>>>:)
>>>>
>>>>>One of the way would be to pass the ID of the selected record as a QueryString.
>>>>>
>>>>>>As a .NET total newbie, can someone tell me how to capture a value from the preceeding page control? Something like :
>>>>>>
>>>>>>myvalue = request.gridview1.value    ???
>>>>>>
>>>>>>
>>>>>>And would the code properly be placed in the load event of the second page if we wanted to use the value to establish a control on the new page?
>>>>>>
>>>>>>Specifically, page1 has a grid where the user selects a record. Control is then transferred to page2 which contains a formview that displays the record details.
>>>>>>
>>>>>>
>>>>>>Thanks
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform