Hello All,
Using DNN 5.1.4 (soon to upgrade to 5.2.x)
I am in the middle of building an app and I am at the point where a user will select a record from a grid and then click a button to view further details of that particular record. Here is the code that works well for me.
You can see the code below that works well, it open a new page, using the second control within the module. In the response.redirect, you can see that I call the ascx contol and pass along a few params, including a key, which I then use to filter the next set of data. The code below generates a long URL that does not look good and is not secure - not even slightly secure.
My question is what is the best, or even better, way to do this. It works as it is currently written, but anyone can change the URL and immediately they see the data of the edited URL. On reading my general asp.net book, I have read about PreviousPage property. Is that what I should be using? Does anyone have any examples of how to use this?
Thanks in advance for your assistance.
Mark Breen
Ireland
Here is the code that works, but I want to improve the URL
protected void cbViewDates_Click(object sender, EventArgs e)
{
GridDataItem gridDataItem = (GridDataItem)RadGrid1.SelectedItems[0];
String key = gridDataItem["Id"].Text;
string[] additionalParams = new string[2];
additionalParams[0] = "OrganisationName=" + HttpUtility.UrlEncode(gridDataItem["OrganisationName"].Text);
additionalParams[1] = "CourseName=" + HttpUtility.UrlEncode(gridDataItem["CourseName"].Text);
Response.Redirect(EditUrl("OrganisationCourseId", key, "ViewCourseDates", additionalParams), true);
}