Hi,
I am trying to add extra function to a small app that I have made and part of incorporating this is to use radio buttons.
Basically a user has to choose between 1 of 2 radio buttons and then press a normal button.
I am having trouble trying to figure out how to check which radio button was chosen when the normal button is pressed.
I think that I need a case statement but can't get my head around it.
Below is a sample of the code used in the normal button press:-
void Button1Click(object sender, EventArgs e)
{
if (Input.Text == "") {MessageBox.Show("You have to enter the Flickr Image Link into the Input box");}
if (Input.Text != "") {
String S1 = Input.Text.Replace("\"","");
String S2 = S1.Replace("<a href","[url");
String S3 = S2.Replace(" ","");
int S4 = S3.IndexOf("title");
int S5 = S3.IndexOf(">");
String S6 = S3.Remove(S4,(S5-S4)+9);
String S7 = S6.Insert(S4,"][img]");
int S8 = S7.IndexOf("width");
int S9 = S7.IndexOf("a>");
String S10 = S7.Remove(S8,(S9-S8)+2);
String S11 = S10.Insert(S8,"[/img][/url]");
Output.Text = S11;
}
}
you see, I would like to run this code only if 1 particular radio button is chosen and run a slightly modified form of this if the other radio button is chosen.
Any pointers would be appreciated.
Regards..,
MT