TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
FIROZ ANSARI
NA
52
5.7k
About Drop down List
Nov 17 2016 1:51 AM
Hi Guys
Please Help me i am getting this error whenever i am selecting any data from drodown lisy
[WebMethod]
public static List<ListItem> GetClassgrp()
{
string query = "select CODE,DESC_E from S_CLASS_GRP Order By 1";
string connectionstring = ConfigurationManager.ConnectionStrings["constrIND"].ConnectionString;
using (OracleConnection con = new OracleConnection(connectionstring))
{
using (OracleCommand cmd = new OracleCommand(query))
{
List<ListItem> classgrp = new List<ListItem>();
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
con.Open();
using (OracleDataReader sdr = cmd.ExecuteReader())
{
while (sdr.Read())
{
classgrp.Add(new ListItem
{
Value = sdr["CODE"].ToString(),
Text = sdr["DESC_E"].ToString()
});
}
}
con.Close();
return classgrp;
}
}
}
and this method i am calling by JQuery Ajax
$.ajax({
type: "POST",
url: "DropDwonPopulate.aspx/GetClassgrp",
data: '{}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {
var ddlCLG = $("[id*=ddlCLG]");
ddlCLG.empty().append('<option selected="selected" value="%">All</option>');
$.each(r.d, function () {
ddlCLG.append($("<option></option>").val(this['Value']).html(this['Text']));
});
}
});
and this is my error
Reply
Answers (
2
)
using modal pop up for diplaying pdf file
How can i Design this User Interface for ASP.NET