コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     cod_tipo = Request.QueryString["tipo"];
     cod_foro = Request.QueryString["fo"];
     if (cod_tipo.Equals("1"))
     {
         Label7.Text = "Foro Academico";
     }
     else
     {
         Label7.Text = "Foro Investigativo";
     }
     if (!IsPostBack)
     {
         foro = new Foro();
         foro.cargar(cod_foro);
         DropDownList2.DataSource = ListasDesple.getTema();
         DropDownList2.DataTextField = "nombre";
         DropDownList2.DataValueField = "id_tema";
         DropDownList2.DataBind();
         TextBox1.Text = foro.Pregunta;
         DropDownList2.SelectedIndex = DropDownList2.Items.IndexOf(DropDownList2.Items.FindByText(foro.Tema));
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     id_foro =  Request.QueryString["id"];
     Foro foro = new Foro();
     foro.cargar(id_foro);
     Label1.Text = foro.Tipo_foro;
     Label2.Text = foro.Tema;
     Label3.Text ="¿ "+ foro.Pregunta+" ?";
     HyperLink1.Text = " "+foro.Usuario;
     HyperLink1.NavigateUrl = Global.ruta + "/perfil.aspx?cod=" + foro.Cod_usuario;
     Label5.Text = "Creado el : "+Convert.ToDateTime(foro.Fecha).ToString("dd-MM-yyyy");
     if(!IsPostBack){
         Session["r_foro"] = "10";
     }
     cargar_comentarios();
 }