Michael Sterling
asked on
Why does my 2nd query string parameter always come up null?
I'm trying to pull a 2nd query string parameter value in as a property to a user control, for some reason it is always coming up null. I think it has something to do with the way i'm constructing my redirect string but i'm not sure. below is the the redirect url, and the properties as i'm trying to get / set them. can someone show me what's wrong with what i'm doin.
Response.Redirect(String.Format("/StudentTime.aspx?AddEdit={0}&SearchBy={1}", addEdit, "FirstAndLastName"));
---my properties GET / SET---
public String AddEdit
{
get
{
m_addedit = Request.QueryString["AddEdit"];
return m_addedit;
}
set
{
m_addedit = value;
}
}
public String SearchBy
{
get
{
m_searchby = Request.QueryString["SearchBy"];
return m_searchby;
}
set
{
m_searchby = value;
}
}
---THE INITIAL IF BELOW ALWAYS FAILS--
if (!string.IsNullOrEmpty(SearchBy))
{
if (string.Equals(SearchBy, "FirstAndLastName"))
{
iobl = InOutListProcessor.GetInOutRecsByStudentName(SearchBy);
//iobl.Add(iob);
}
if (string.Equals(SearchBy, "StudentID"))
{
iob = InOutListProcessor.GetInOutRecsByStudentID(SearchBy);
iobl.Add(iob);
}
if (string.Equals(SearchBy, "TeamName"))
iobl = InOutListProcessor.GetInOutRecsByTeamName(SearchBy);
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER