Thank you very much. This is my best Solution for me. after I find out all the world.
@VetrivelD9 жыл бұрын
+ทนงศักดิ์ จันทะสิงห์ Thank You.. Please Post your Question?
@howard1236669 жыл бұрын
Thank you for your Video! It's very useful to me!
@graysonelliott56493 жыл бұрын
i know I'm kinda randomly asking but do anyone know a good website to stream new tv shows online?
@DavidG-qm5vf9 жыл бұрын
Nice video! Thanks for your video!
@VetrivelD9 жыл бұрын
+Jose David Thank You.. Please Post your Question?
@VetrivelD9 жыл бұрын
Step: 1 Step: 2 Populate DropDownList using jQuery AJAX Select Student: Step: 3 using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Web.Services; Step: 4 public class Student { public string StuId { get; set; } public string StuName { get; set; } } [WebMethod] public static List PopulateDropDownList() { DataTable dt = new DataTable(); List objDept = new List(); using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["conStr"].ConnectionString)) { using (SqlCommand cmd = new SqlCommand("SELECT ID,Stu_Name FROM Student", con)) { con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { objDept.Add(new Student { StuId = dt.Rows[i]["ID"].ToString(), StuName = dt.Rows[i]["Stu_Name"].ToString() }); } } return objDept; } } } Step: 5 $(document).ready(function () { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", //url is the path of our web method (Page name/function name) url: "JQueryBindDropDown.aspx/PopulateDropDownList", data: "{}", dataType: "json", //called on jquery ajax call success success: function (result) { $('#ddlStudent').empty(); $('#ddlStudent').append("--Select--"); $.each(result.d, function (key, value) { $("#ddlStudent").append($("").val(value.StuId).html(value.StuName)); }); }, //called on jquery ajax call failure error: function ajaxError(result) { alert(result.status + ' : ' + result.statusText); } }); });
@savithirir72825 жыл бұрын
What result
@RaulJordan237 жыл бұрын
Thank you very much!. it was very usefull!!!!
@VetrivelD7 жыл бұрын
Thanks for your valuable feedback. Refer our channel in your friend circle.
@SaiRam1990_11 ай бұрын
Hi i saw your video. Very helpful. But i need the same for gridview . Pls help me
@alexanderrodrigues90035 жыл бұрын
Thank you!!!
@priyankatripathi5629 жыл бұрын
Can you please provide the script of the code because I am unable to get the code and I have having two column in a table States and country so is it necessary to have ID column also.I want to populate the States only and on the basis of selection of State in Dropdownlist I need to pupulate the Cities name in the checkboxlist and that checkboxlist should be bind from database.Can you please help me on this.Thanks
@priyankatripathi5629 жыл бұрын
Hi Sir,Can you help on the same on the problem I have mentioned.
@ikramlim8 жыл бұрын
Thank you very much. but I have a question if I want to bind the data from service how I can change it?? Example public void GetAgencyNames() { var listOfAgencyNames = UserProfileService.GetAgencyNames(agencyNAMEVO); DropDownAgencyName.DataSource = listOfAgencyNames; DropDownAgencyName.DataValueField = "AgencyName"; DropDownAgencyName.DataTextField = "AgencyName"; DropDownAgencyName.DataBind(); DropDownAgencyName.Items.Insert(0, new ListItem("Please select a value", "")); } Please help.. Thanks
@jasminem84574 жыл бұрын
I tried this one before watching this,the same way I bind ddl with Ajax...and work out for me, but after that in save button I have to save the ddl value to the db table, but I get the selected value as empty...I stuck with this today...🤔
@pshah29529 жыл бұрын
Good clear steps but very slow video
@kibelo22675 жыл бұрын
Nice!!!
@duttpankaj54777 жыл бұрын
hi sir can u provide code like if i am select picture of state there city picture is open.if i select city picture there area picture will display.the query is like state?cityid=1.please sir provide this code.
@humbertoporras44886 жыл бұрын
Thanks
@kishanwebsolution86907 жыл бұрын
plz sir solve my problem product searching use autocomplete
@shwetabhat68153 жыл бұрын
Can I get code please
@diegodiaz68157 жыл бұрын
step 1 step2 step 3 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Web.Services; public partial class AjaxDataBlindDropDown : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } public class cierre { public string idCierreInd { get; set; } public string Cierre { get; set; } } [WebMethod] public static List ddl() { DataTable dt = new DataTable(); String CS = ConfigurationManager.ConnectionStrings["t3Procesos"].ConnectionString; List objDept = new List(); using (SqlConnection con = new SqlConnection(CS)) { using (SqlCommand cmd = new SqlCommand("SELECT TOP 100 idCierreInd,Cierre from [t3Procesos].dbo.m_cierreIndividual", con)) { con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { objDept.Add(new lcierre { idCierreInd = dt.Rows[i]["idCierreInd"].ToString(), Cierre = dt.Rows[i]["Cierre"].ToString() }); } } return objDept; } } } } step 4 $(document).ready(function(){ $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "AjaxDataBlindDropDown.aspx/ddl", data: "{}", dataType: "json", success: function (result) { $('#DropDownList1').empty(); $('#DropDownList1').append("--Select--"); $.each(result.d, function (key,value) { $('#DropDownList1').append($("").val(value.idCierreInd).html(value.Cierre)); }); }, failure: function ajaxError(result) { alert(result.status +':'+ result.statusText); } }); });