Hello, I have created a function that will display an image link if the ID contains inside the database, is a number and has only one parameter. My only problem is the parameter while the rest is working perfectly.
The current url image is like this: https://mywebsite/content/display.aspx?ID=75. But when I add another parameter into it, https://mywebsite/content/display.aspx?ID=75&=12, it still displays the image, even though the function clearly states only one parameter is allowed. This is my code:
string imageID = Context.Request.QueryString["ID"];
int result;
string[] urlSplit = imageID.Split('&');
try
{
if (!String.IsNullOrEmpty(imageID) && (int.TryParse(imageID, out result)) && ((urlSplit.Length < 2)))
{
...
Go to the complete details ...