after I have made my research (I couldn't mark any answer kindly given here on my post)
then I tested two options I've encountered in this Stack Overflow Page:
first option (given by Ahmad Mageed) I have tested to work just fine .
and readability was easy to understand (as I am still fresh to asp.net 'tricks')
then followed the answer by
annakata which was remarkably improved approach in the way that you
don't actually have to redirect to achieve result - Query String IS modified
after playing around i have desided to follow annakatas approach
and make a helper method that was using also a redirerion option
with modified QueryString Parameters & values.
public void QuerStrModify(string CurrQS_ParamName, string NewQs_paramName, string NewPar_Value, bool redirectWithNewQuerySettings = false)
{
// reflect to readonly property
PropertyInfo isReadOnly = typeof(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.NonPublic);
// make collection editable
isReadOnly.SetValue(this.Request.QueryString, false, null);
// remove
this.Request.QueryString.Remove(CurrQS_ParamName);
// modify
this.Request.QueryString.Set(NewQs_paramName, NewPar_Value);
// make collection readonly again
isReadOnly.SetValue(this.Request.QueryString, true, null);
string FullUrl = Request.Url.AbsolutePath;
if (redirectWithNewQuerySettings)
{
Response.Redirect(string.Join("?", FullUrl, this.Request.QueryString));
}
}
i find it very helpful to someone that has Considerably less experience with asp.net developmet
so i posted it as my version of correct answer , as i see it .
i hope it'll help somoeone else that seeks the same Solution.
feel free to further improve it , as i mentiond I'm not a proven talent ..yet.