Hello !
I'm a beginner with Telerik and ASP.NET.
I would like to do something I know it is possible but I can't understand how it works.
I work with VB.NET. I have a page with code behind.
In my page, the first time it is displayed, I want to show only
- a telerik:RadTextBox
- and an asp:ImageButton
What I would like to do is :
When the user write some text in the radtextbox then click on the ImageButton, I want to execute in the code behind of my page, some
code with an sql query and then, if with the sql query I find in my databases the value the user has written in the radtextbox, I
would like to show a panel (just change its property VISIBLE=FALSE to TRUE) and then to fill a telerik:RadComboBox that is situated
inside the panel that is now visible.
If the sql query can't find the value, I do not show the panel and I just show an error message on the page (with a label).
I have tried so many things but I can't understand how to do this.
Thank you for your help.
This is my code in the page with the controls :
(the panel i want to change the property VISIBLE is the one with the ID="PanelMineListe" - the textbox the user uses to write the
first value is the one with the ID="RadTextBoxMine" the he clicks on the imagebutton with te id="BtImgMineValider")
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ajax-essais.aspx.vb" Inherits="ajax_essais" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Essais</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
<asp:Panel ID="PanelRechMINE" runat="server" DefaultButton="BtImgMineValider"
style="width:440px; padding-left:81px; height:100px; padding-top:20px; float:left;">
<div style="float:left; position:relative; width:420px;">
<div style="float:left; position:relative; padding-right:6px; height:28px;">
<telerik:RadTextBox ID="RadTextBoxMine" runat="server" CssClass="BoxesOmbrees"
EmptyMessage="Votre type Mine ici.." ValidationGroup="RechMine"
Skin="Windows7" Width="190px"></telerik:RadTextBox>
</div>
<div style="float:left; position:relative; padding-right:6px; height:28px;">
<asp:ImageButton ID="BtImgMineValider" runat="server" Visible="true"
ImageUrl="~/photos-francepiecesauto/commun/BtTrouver_r1_c1.png" ValidationGroup="RechMine"
title="Lancer une recherche.." />
</div>
<div style="float:left; position:relative; height:28px; font-size:10px; color:#ff0000; padding-top:6px;">
<asp:RequiredFieldValidator ID="RequiredFieldValidatorMine1" runat="server" ControlToValidate="RadTextBoxMine"
ErrorMessage="* Type Mine requis." Display="Dynamic" ValidationGroup="RechMine" />
</div>
</div>
<asp:Panel ID="PanelMineErrors1" runat="server" Visible="false" style="float:left; position:relative; width:420px; font-size:10px;
color:#ff0000;">
<asp:Label ID="LabelMineErrors1" runat="server" />
</asp:Panel>
<asp:Panel ID="PanelMineListe" runat="server" DefaultButton="ImageButtonMineValid2" Visible="false" style="float:left;
position:relative; width:420px;">
<div style="float:left; position:relative; padding-right:6px; width:300px; height:28px;">
<telerik:RadComboBox ID="RadComboBoxMineListe" runat="server" MaxHeight="200px" Width="296px"
ValidationGroup="RechMine2" EmptyMessage="Choisissez un véhicule..." />
</div>
<div style="float:left; position:relative; height:28px; font-size:10px; color:#ff0000;">
<asp:ImageButton ID="ImageButtonMineValid2" runat="server" Visible="true"
ImageUrl="~/photos-francepiecesauto/commun/BtTrouver2_r1_c1.png" ValidationGroup="RechMine2"
title="Afficher le catalogue.." ToolTip="Afficher le catalogue.." />
<asp:RequiredFieldValidator ID="RequiredFieldValidatorMine2" runat="server" style="color:#ff0000;"
ControlToValidate="RadComboBoxMineListe" ErrorMessage=" *" Display="Dynamic" ValidationGroup="RechMine2" />
</div>
</asp:Panel>
</asp:Panel>
</form>
</body>
</html>
I'm a beginner with Telerik and ASP.NET.
I would like to do something I know it is possible but I can't understand how it works.
I work with VB.NET. I have a page with code behind.
In my page, the first time it is displayed, I want to show only
- a telerik:RadTextBox
- and an asp:ImageButton
What I would like to do is :
When the user write some text in the radtextbox then click on the ImageButton, I want to execute in the code behind of my page, some
code with an sql query and then, if with the sql query I find in my databases the value the user has written in the radtextbox, I
would like to show a panel (just change its property VISIBLE=FALSE to TRUE) and then to fill a telerik:RadComboBox that is situated
inside the panel that is now visible.
If the sql query can't find the value, I do not show the panel and I just show an error message on the page (with a label).
I have tried so many things but I can't understand how to do this.
Thank you for your help.
This is my code in the page with the controls :
(the panel i want to change the property VISIBLE is the one with the ID="PanelMineListe" - the textbox the user uses to write the
first value is the one with the ID="RadTextBoxMine" the he clicks on the imagebutton with te id="BtImgMineValider")
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ajax-essais.aspx.vb" Inherits="ajax_essais" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Essais</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
<asp:Panel ID="PanelRechMINE" runat="server" DefaultButton="BtImgMineValider"
style="width:440px; padding-left:81px; height:100px; padding-top:20px; float:left;">
<div style="float:left; position:relative; width:420px;">
<div style="float:left; position:relative; padding-right:6px; height:28px;">
<telerik:RadTextBox ID="RadTextBoxMine" runat="server" CssClass="BoxesOmbrees"
EmptyMessage="Votre type Mine ici.." ValidationGroup="RechMine"
Skin="Windows7" Width="190px"></telerik:RadTextBox>
</div>
<div style="float:left; position:relative; padding-right:6px; height:28px;">
<asp:ImageButton ID="BtImgMineValider" runat="server" Visible="true"
ImageUrl="~/photos-francepiecesauto/commun/BtTrouver_r1_c1.png" ValidationGroup="RechMine"
title="Lancer une recherche.." />
</div>
<div style="float:left; position:relative; height:28px; font-size:10px; color:#ff0000; padding-top:6px;">
<asp:RequiredFieldValidator ID="RequiredFieldValidatorMine1" runat="server" ControlToValidate="RadTextBoxMine"
ErrorMessage="* Type Mine requis." Display="Dynamic" ValidationGroup="RechMine" />
</div>
</div>
<asp:Panel ID="PanelMineErrors1" runat="server" Visible="false" style="float:left; position:relative; width:420px; font-size:10px;
color:#ff0000;">
<asp:Label ID="LabelMineErrors1" runat="server" />
</asp:Panel>
<asp:Panel ID="PanelMineListe" runat="server" DefaultButton="ImageButtonMineValid2" Visible="false" style="float:left;
position:relative; width:420px;">
<div style="float:left; position:relative; padding-right:6px; width:300px; height:28px;">
<telerik:RadComboBox ID="RadComboBoxMineListe" runat="server" MaxHeight="200px" Width="296px"
ValidationGroup="RechMine2" EmptyMessage="Choisissez un véhicule..." />
</div>
<div style="float:left; position:relative; height:28px; font-size:10px; color:#ff0000;">
<asp:ImageButton ID="ImageButtonMineValid2" runat="server" Visible="true"
ImageUrl="~/photos-francepiecesauto/commun/BtTrouver2_r1_c1.png" ValidationGroup="RechMine2"
title="Afficher le catalogue.." ToolTip="Afficher le catalogue.." />
<asp:RequiredFieldValidator ID="RequiredFieldValidatorMine2" runat="server" style="color:#ff0000;"
ControlToValidate="RadComboBoxMineListe" ErrorMessage=" *" Display="Dynamic" ValidationGroup="RechMine2" />
</div>
</asp:Panel>
</asp:Panel>
</form>
</body>
</html>