עדיין בנושא CascadingDropDown

juliazulay

New member
עדיין בנושא CascadingDropDown

ממש סליחה על הנודניקיות שלי , אבל מה לעשות, כמה שאני חופרת ברשת לא מוצאת פטרון לצאת מיזה, אני חייבת שהסלקט השלישי שלי , כאשר אני בוחרת ערך מיתוכו ואז ללכת לDB ומשם להביא ערכים ולשפוך אותם בLABLE , פעולה לכאורה מאוד פשוטה אבל התוספת הזאת של הCascadingDropDown מבלבלת אותי, מה שכן הבנתי בגלל שכאן אין לי POSTBACK לשרת אז אירוע הזה של הCHANCHINDEX לא תופסת אותי, וצריך באמצעות JS אני חושבת, אבל כיצד לגשת עם JS ולהחזיר לLABLE משהו בבקשה פליז יכול לעזור משהו שעבד עם הפקד הזהCascadingDropDown יוליה בבקשה GUI <%@ Page Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeFile="qesAnser.aspx.cs" Inherits="qesAnser" ValidateRequest="false" EnableViewStateMac ="false" EnableEventValidation="false"%> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Label ID="LabelMess" runat="server" Text="Label"></asp:Label> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:DropDownList ID="DropDownListSubject" runat="server" Height="24px" Width="233px"> </asp:DropDownList><br /> <asp:DropDownList ID="DropDownListSubSubject" runat="server" Height="24px" Width="233px"> </asp:DropDownList><br /> <asp:DropDownList ID="DropDownListQuestion" runat="server" Height="24px" Width="233px" OnSelectedIndexChanged="DropDownListQuestion_SelectedIndexChanged1"> </asp:DropDownList><br /> <br /> <br /> <ajaxToolkit:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownListSubject" Category="subject" PromptText="Please select a make" LoadingText="[Loading makes...]" ServicePath="~/WebService.asmx" ServiceMethod="GetSubjects"/> <ajaxToolkit:CascadingDropDown ID="CascadingDropDown2" runat="server" TargetControlID="DropDownListSubSubject" Category="subSubject" PromptText="Please select a model" LoadingText="[Loading models...]" ParentControlID="DropDownListSubject" ServicePath="~/WebService.asmx" ServiceMethod="GetSubSubjects"/> <ajaxToolkit:CascadingDropDown ID="CascadingDropDown3" runat="server" TargetControlID="DropDownListQuestion" Category="TypeQuestion" PromptText="Please select a color" LoadingText="[Loading colors...]" ServicePath="~/WebService.asmx" ServiceMethod="GetQuestion" ParentControlID="DropDownListSubSubject"/> <asp:Literal ID="LiteralAns" runat="server"></asp:Literal> </ContentTemplate> </asp:UpdatePanel> <asp:Button ID="Button1" runat="server" Text="Button" OnClick = "Button1_Click" /> </asp:Content> בבקשה בCOD BEHIND protected void DropDownListQuestion_SelectedIndexChanged1(object sender, EventArgs e) { DataTable dt = new DataTable(); int idQuestion; idQuestion = DropDownListQuestion.SelectedIndex; if (idQuestion != 0) { dt = ml.OutpoutAnswetToQuestion(Convert.ToInt32(DropDownListQuestion.SelectedValue), out objMess); if (objMess.ToString() == "") { string answer = ml.CreateAnswer(dt); LiteralAns.Text = answer; } else { LabelMess.Text = mess.ErrorConn + objMess.ToString(); objMess = ""; } }
 

juliazulay

New member
שאני אבין אני היחדה כאן שמממשת AJAX

2.0 אך שהו כך זה נראה לי, מה אף אחד לא ניסה לממש את הפקד הזה, הוא פשוט מדהים, אבל אך לעזאזל אני מטפלת בDDL השלישי, אך אני גורמת לאירוע שבו לעבוד, הרי אין לי POSTBACK זה לכאורה צד לקוח, אבל אך לעזאזל מצד לקוח אני פונה לLABLE וחשוב שזה יהיה LABLE של DOT.NET ולא צד לקוח. יוליה
 
למעלה