15,904,351 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12857356 (Top 45 by date)
Member 12857356
1-Feb-17 8:01am
View
I know what is debugging Sir..I done the debugging the i see the values there only
Member 12857356
1-Feb-17 7:13am
View
for Example
1 2 3 4 5 these are all checkbox
When i click 1 it seems 1
When i click 1 and 2 and 3 means it seems like 1,1,2,1,2,3
Member 12857356
1-Feb-17 7:06am
View
When i click one checkbox means itz working fine. for ex It seems like 1
But When i click more than one checkbox means it seems like 1,1,2
Member 12857356
17-Jan-17 6:27am
View
Am using a button which is inside the datalist
The datalist ehich is inside the gridview.
I want to change the button color which is in the datalist
Member 12857356
17-Jan-17 3:19am
View
yeah Understood Man
Member 12857356
17-Jan-17 2:52am
View
Thank you itz working
Member 12857356
17-Jan-17 2:39am
View
Thanks
But i want all the column names and values in row wise
Member 12857356
17-Jan-17 2:32am
View
Do u have any Examples
Member 12857356
10-Jan-17 5:57am
View
In this i have a gridview .Inside the gridview i put the panel and datalist controls.The datalist contain datas.So i put the panel as display:none.In the Gridview i have an Image ,So when we click a image the panel will shown..this is my issue..
Member 12857356
10-Jan-17 5:30am
View
Sry ....Wrongly Enter the code..Now u check ? pleas
Member 12857356
10-Jan-17 5:20am
View
i will try this method .But the panel is not shown
This is my code:
$(function () {
$("[src*=photo]").live("click", function () {
debugger;
alert("hi");
var panel = document.getElementById(".pnlgrd");
panel.style.display = "block";
Member 12857356
10-Jan-17 1:10am
View
when am inspect the page hte values have been in the inspect page.I want the values when i click the ViewSeat Buttons.Its Happens only in client side not server side
Member 12857356
9-Jan-17 5:42am
View
Now i put my relevant code .
Member 12857356
9-Jan-17 5:29am
View
private static DataTable GetData(string query)
{
string strConnString = ConfigurationManager.ConnectionStrings["str"].ConnectionString;
using (SqlConnection con = new SqlConnection(strConnString))
{
SqlCommand cmd = new SqlCommand(query, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
string id=HttpContext.Current.Session["id"].ToString();
cmd.Parameters.AddWithValue("@id",id );
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
}
protected void rptrbus_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string id = rptrbus.DataKeys[e.Row.RowIndex].Value.ToString();
Session["id"]=id.ToString();
DataList dlseat = e.Row.FindControl("dlSeat") as DataList;
dlseat.DataSource=GetData(string.Format("sp_Trial"));
dlseat.DataBind();
}
}
Member 12857356
9-Jan-17 5:29am
View
<asp:GridView ID="rptrbus" runat="server" GridLines="None" DataKeyNames="RouteID"
AutoGenerateColumns="false" onrowdatabound="rptrbus_RowDataBound">
<columns>
<asp:templatefield>
<itemtemplate>
<asp:Panel ID="pnlGrd" runat="server" Style="display: none">
<asp:DataList ID="dlSeat" runat="server" RepeatColumns="4">
<itemtemplate>
<asp:Button ID="btnSeat" CssClass="btnseat" runat="server" Text='<%#Bind("Seatno") %>' />
<asp:Label ID="lblBusname" runat="server" Text='<%#Bind("TravelsName") %>'>
<asp:Label ID="lblBusfare" runat="server" Text='<%#Bind("StartTime") %>'>
<asp:Label ID="lblEndtime" runat="server" Text='<%#Bind("EndTime") %>'>
<asp:Label ID="lblTravtime" runat="server" Text='<%#Bind("TravelTime") %>'>
Rs:<asp:Label ID="lbFare" runat="server" Text='<%#Bind("fare") %>'>
<asp:Label ID="lblseat" runat="server" Text='<%#Bind("NoOfseats")%>'>
<asp:Button ID="btnSeat" style="
background-color: brown;
color: antiquewhite;
height: 24px;
border-radius: 12px;
" runat="server" CssClass="seatbtn" Text="ViewSeats" />
Member 12857356
9-Jan-17 5:22am
View
Deleted
<asp:GridView ID="rptrbus" runat="server" GridLines="None" DataKeyNames="RouteID"
AutoGenerateColumns="false" onrowdatabound="rptrbus_RowDataBound">
<columns>
<asp:templatefield>
<itemtemplate>
<asp:Panel ID="pnlGrd" runat="server" Style="display: none">
<asp:DataList ID="dlSeat" runat="server" RepeatColumns="4">
<itemtemplate>
<asp:Button ID="btnSeat" CssClass="btnseat" runat="server" Text='<%#Bind("Seatno") %>' />
<asp:Label ID="lblBusname" runat="server" Text='<%#Bind("TravelsName") %>'>
<asp:Label ID="lblBusfare" runat="server" Text='<%#Bind("StartTime") %>'>
<asp:Label ID="lblEndtime" runat="server" Text='<%#Bind("EndTime") %>'>
<asp:Label ID="lblTravtime" runat="server" Text='<%#Bind("TravelTime") %>'>
Rs:<asp:Label ID="lbFare" runat="server" Text='<%#Bind("fare") %>'>
<asp:Label ID="lblseat" runat="server" Text='<%#Bind("NoOfseats")%>'>
<asp:Button ID="btnSeat" style="
background-color: brown;
color: antiquewhite;
height: 24px;
border-radius: 12px;
" runat="server" CssClass="seatbtn" Text="ViewSeats" />
<%--<asp:Label ID="lbl" runat="server" style="
background-color: brown;
color: antiquewhite;
height: 24px;
border-radius: 12px;
" CssClass="seatbtn" Text="ass"
>--%>
Member 12857356
9-Jan-17 5:22am
View
Deleted
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.Web.Services;
using System.Text;
using System.Data.SqlClient;
public partial class ViewBusDetails : System.Web.UI.Page
{
string from;
string to;
string date;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
from = Request.QueryString["from"].ToString();
to = Request.QueryString["to"].ToString();
date = Convert.ToString(Request.QueryString["date"]);
string cs = ConfigurationManager.ConnectionStrings["str"].ConnectionString;
using (SqlConnection con = new SqlConnection(cs))
{
con.Open();
SqlCommand cmd = new SqlCommand("spSearchBus", con);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@from", from);
cmd.Parameters.AddWithValue("@to", to);
cmd.Parameters.AddWithValue("@date", date);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
//grdViewbus.DataSource = dt;
//grdViewbus.DataBind();
rptrbus.DataSource = dt;
rptrbus.DataBind();
}
}
}
private static DataTable GetData(string query)
{
string strConnString = ConfigurationManager.ConnectionStrings["str"].ConnectionString;
using (SqlConnection con = new SqlConnection(strConnString))
{
SqlCommand cmd = new SqlCommand(query, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
string id=HttpContext.Current.Session["id"].ToString();
cmd.Parameters.AddWithValue("@id",id );
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
}
protected void rptrbus_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string id = rptrbus.DataKeys[e.Row.RowIndex].Value.ToString();
Session["id"]=id.ToString();
DataList dlseat = e.Row.FindControl("dlSeat") as DataList;
dlseat.DataSource=GetData(string.Format("sp_Trial"));
dlseat.DataBind();
}
}
}
Member 12857356
6-Jan-17 3:03am
View
Thanks, \
But in my case i want the Column name based n values ...
Member 12857356
6-Jan-17 2:57am
View
So u say it is not possible .?
Member 12857356
5-Jan-17 6:59am
View
How it is Possible in realtime?
If we have the admin
we have to enter the details of the flight like name,Flight Departure,Flight Fare, and seating capacity
Then the admin clik ok all the detials will save in database .
In this case how insert the seat value A1 A2 like that
Member 12857356
5-Jan-17 6:46am
View
Will checck let yu know
Member 12857356
4-Jan-17 8:49am
View
thank you Got a answer
Member 12857356
4-Jan-17 8:45am
View
No the first Column is identity column
Member 12857356
4-Jan-17 8:42am
View
No,It is another Id am gettting from other table.
Member 12857356
30-Dec-16 1:23am
View
Thanks for reply,
Here Am using Gridview control.Inside Gridview control am using one button,when we click the button the popup will show.
Member 12857356
19-Dec-16 6:52am
View
Fr example:
I am using the Linkbutton Called Edit.When we click a edit button the edit page will shown.After we change the Datas I have to update the Changed datas ty database.In this case i want my ID to update my datas.
Member 12857356
19-Dec-16 6:27am
View
Y we Cant Pass values through session or viewstate
Member 12857356
8-Dec-16 5:34am
View
Yes ..After checkbox validation ajax will be called.In this Case i didnot use any Button .
Member 12857356
21-Nov-16 1:00am
View
In the client side the values cannot be passed.But before ajax tag i give an Alert to that value..That the value will be in the alert box.But inside the Ajax tag the value didnot taken
Member 12857356
19-Nov-16 0:54am
View
I have A slider range in jquery.Its Working Properly.But I want to pass the slider values(when we drag a slider we got some values) to server side.I tried with Webservice JSON.But its throw an error.Icant pass the value
Member 12857356
18-Nov-16 5:58am
View
Why Itz Happen.Am sry Am i Disturbing You,And Am new to Asp.net,Ajax tatz Y am raising So much Of Question.
Member 12857356
18-Nov-16 5:53am
View
If i use static my datalist make an error.(Object reference is non-static) like This.
Member 12857356
18-Nov-16 5:50am
View
R u there?
Member 12857356
18-Nov-16 5:45am
View
If i use static my datalist make an error.(Object reference is non-static) like This.
Member 12857356
18-Nov-16 5:42am
View
I dont Know Why this error Occured
Member 12857356
18-Nov-16 5:39am
View
Still I have the same error.
And this is my server side code
[System.Web.Script.Services.ScriptMethod()]
[System.Web.Services.WebMethod]
public void range(string Price1, string Price2)
{
string cs = ConfigurationManager.ConnectionStrings["str"].ConnectionString;
using (SqlConnection con = new SqlConnection(cs))
{
string str = "select * from tblProddetails where CategoryID where ProductPrice Between @1 and @2";
SqlCommand cmd = new SqlCommand(str, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
cmd.Parameters.AddWithValue("@1", Price1);
cmd.Parameters.AddWithValue("@2", Price2);
DataTable ds = new DataTable();
da.Fill(ds);
con.Open();
con.Close();
con.Dispose();
dlViewProd.DataSource = ds;
dlViewProd.DataBind();
}
Member 12857356
18-Nov-16 5:37am
View
Yeah My function name is range and my paramater name is Price1 and Price2
Member 12857356
18-Nov-16 5:30am
View
Yes Er.Punnet Goel.
Member 12857356
18-Nov-16 5:28am
View
$(ajax) Outside the tag of Ajax The alert will Work and I got that value. But Inside ajax tag the value is not appear
Member 12857356
18-Nov-16 5:26am
View
when i change the slider the alert box Will appear Tat says [object object].
Member 12857356
18-Nov-16 5:21am
View
My Slider is working Good.But I want to Pass the values to the server side.
Member 12857356
18-Nov-16 5:11am
View
How to get Two values ????
Example:"
$.ajax({
method: 'post',
url: 'UserViewProd.aspx/range',
contentType: 'application/json; charset=utf-8',
data: "{'Price1':'" + ui.values[0] + "','Price2':'" + ui.values[1] + "'}"
success: function (data) {
// $("#txtminprice").val(data.d);
// $("#txtmaxprice").val(data.d);
},
error: function (err) {
alert(err);
}
});
Is this Format Is Correct ? Or Wrong?
Member 12857356
18-Nov-16 3:23am
View
I want the postback Code to filter My records through webservice &Json
Member 12857356
18-Nov-16 3:22am
View
I want the postback to filter my records.
thanks
Member 12857356
18-Nov-16 2:14am
View
Hi Nelek,
Thanks For Reply,
Textbox_textchanges will Triggerd only when we entered some text in the Textbox. But in the Range Slider when we drag the slider automatically the values in the Textbox will change so the textbox_textchanged will not be triggered.
Any Idea How to get the slider values to Filter my data.
Thanks
Show More