GIF89;a
GIF89;a
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ControlTab : System.Web.UI.UserControl
{
public void AjaxText(string p_title, string p_text)
{
HelpButtonAjax1.Text = "
" + p_title
+ "
" + p_text;
}
public string Text
{
get
{
return Label1.Text;
}
set
{
Label1.Text = value;
}
}
public string Name_rb1
{
get
{
return RB_name_1.Text;
}
set
{
RB_name_1.Text = value;
}
}
public string Name_rb2
{
get
{
return RB_name_2.Text;
}
set
{
RB_name_2.Text = value;
}
}
public string Name_rb3
{
get
{
return RB_name_3.Text;
}
set
{
RB_name_3.Text = value;
}
}
public bool visible_rb1
{
get
{
return RB_name_1.Visible;
}
set
{
RB_name_1.Visible = value;
RadioButton1.Visible = value;
}
}
public bool visible_rb2
{
get
{
return RB_name_2.Visible;
}
set
{
RB_name_2.Visible = value;
RadioButton2.Visible = value;
}
}
public bool visible_rb3
{
get
{
return RB_name_3.Visible;
}
set
{
RB_name_3.Visible = value;
RadioButton3.Visible = value;
}
}
public string SelectedText
{
get
{
if (RadioButton1.Checked)
{
return RB_name_1.Text;
}
if (RadioButton2.Checked)
{
return RB_name_2.Text;
}
if (RadioButton3.Checked)
{
return RB_name_3.Text;
}
return "";
}
}
public int SelectedItem
{
get
{
if (RadioButton1.Checked)
{
return 0;
}
if (RadioButton2.Checked)
{
return 1;
}
if (RadioButton3.Checked)
{
return 2;
}
return -1;
}
set
{
if (value < 3)
{
SelectedItem = value;
if (value == 0)
{
RadioButton1.Checked = true;
}
if (value == 1)
{
RadioButton2.Checked = true;
}
if (value == 2)
{
RadioButton3.Checked = true;
}
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
RadioButton1.GroupName = String.Format("{0}_{1}", this.ID, "RB");
RadioButton2.GroupName = String.Format("{0}_{1}", this.ID, "RB");
RadioButton3.GroupName = String.Format("{0}_{1}", this.ID, "RB");
}
}