mathieu_cupryk
asked on
Extract an string the following:
I have four strings.
I need to extract
PanelReOpenedTicket.Visibl e = false;
PanelClosedTicket.Visible = false;
PanelWaitingTicket.Visible = false;
PanelOpenTicket.Visible = true;
the middle string.
ReOpen
Closed
Waiting
Open
I need to extract
PanelReOpenedTicket.Visibl
PanelClosedTicket.Visible = false;
PanelWaitingTicket.Visible
PanelOpenTicket.Visible = true;
the middle string.
ReOpen
Closed
Waiting
Open
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello,
If you are trying to see if those values exist within a string and it will decide which panel will be displayed, the following will work.
If you are trying to see if those values exist within a string and it will decide which panel will be displayed, the following will work.
if (inputstring.ToLower().Contains("reopen"))
{
PanelReOpenedTicket.Visible = true;
}
else if (inputstring.ToLower().Contains("closed"))
{
PanelClosedTicket.Visible = true;
}
else if (inputstring.ToLower().Contains("waiting"))
{
PanelWaitingTicket.Visible = true;
}
else if (inputstring.ToLower().Contains("opened"))
{
PanelOpenTicket.Visible = true;
}
ASKER