16,019,957 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 Visual Basic questions
View Javascript questions
View .NET 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 Rahul Vohra (Top 15 by date)
Rahul Vohra
6-Mar-14 11:52am
View
Hi, thanks for the reply. I'm not sure how to do it. Can you help? skype - vohrahul, whatsapp - +919899929886, gmail - rvohra91
Rahul Vohra
24-Feb-14 15:45pm
View
Please replace your button1_click event handler to following:
private void button1_Click(object sender, EventArgs e)
{
Staff s = new Staff();
staffAG j = new staffAG();
j.id = comboBox2.SelectedIndex;
j.name = textBox2.Text;
j.age = textBox3.Text;
j.phone = textBox4.Text;
j.gender = "Male";
j.address = textBox5.Text;
j.post = comboBox1.Text;
s.updatestaff(j);
MessageBox.Show("Record updated");
}
and see if it works!
Rahul Vohra
24-Feb-14 13:49pm
View
No one to answer this??? :(
Rahul Vohra
15-Feb-14 11:53am
View
Thanks for replying! It was not detecting! I copied and pasted the scripts ref from another project and I realized I forgot to remove "~" from the source path! It is working fine now!
Rahul Vohra
14-Feb-14 15:59pm
View
Updated my question with the markup!! Please have a look at it and tell me where the problem is!! :(
Rahul Vohra
15-Oct-13 8:58am
View
@Ajay J Singh Remove() method doesn't accept index.. RemoveAt() method does and I have tried that as well. If you read my question again I've mentioned where the problem is I just don't know how to fix it. The problem is that listA.Items.Count returns 0. But it should not because I'm populating listA with sqlDataSource as you can see in my aspx. Don't know why is this happening!
Rahul Vohra
14-Oct-13 14:33pm
View
@Phani First of all that listA.Items.Clear() is not the solution which I'm looking for I forgot to update it my bad. I just want to remove few elements from listA not all. Suppose I fetch some text from my database and stored them in some array say like [subject1, subject5, subject8]. Now listA is bound to sqlDataSource which automatically loads the listA with subjects from 1-10 (say). Now I know clear() would clear all from 1-10. I don't want that. I just want to remove only a few. So it should be done with Remove() or RemoveAt() but I have tried everything but unable to compare some text to the listItem's text. That is perfect solution to what I'm trying to achieve but I just don't how to do it!
Rahul Vohra
14-Oct-13 10:21am
View
sure! didnt change anything in aspx, and updating question with updated cs....
Rahul Vohra
14-Oct-13 4:15am
View
And yes, the values are proper. Also I'm sure the problem is about binding as you mentioned. But please tell me how can I bind on page load if I'm using sqlDataSource!
Rahul Vohra
14-Oct-13 3:59am
View
I'm not sure if that is the problem. But I am using an sqldatasource and I guess sqldtasource binds the listA on page load! I was not sure about this also as I'm new to asp.net and I don't know the life cycle of the controls, so I tried calling databind() before my edit operation but it still did not work. Although I am now able to add those items to listB but still unable to remove them from listA.
Rahul Vohra
13-Oct-13 1:55am
View
Please check this link for image showing the same : http://goo.gl/AamnJ9
Rahul Vohra
11-Oct-13 16:43pm
View
Very nice, if you don't have answer to some question, just DOWNVOTE it! Good Lord! Help Me!
Rahul Vohra
10-Oct-13 7:02am
View
sure
Rahul Vohra
16-Sep-13 16:42pm
View
And I forgot to mention, I don't want to create another table, as I cannot change the database structure.. Cannot add or remove tables.. !!So, I need to do this in the code behind!
Rahul Vohra
16-Sep-13 16:35pm
View
Really appreciate your quick response Maciej Los, but as I mentioned I want to do the same in c# and display the result in a data grid view.
I have no knowledge of what you have posted. I guess its T-SQL, but I wanted in c#.
So, in short I want to fetch lessonIDs from database -> use a loop to fill a datatable with lesson names corresponding to fetched lessonIDs, and then display these lesson names, in one of the columns of the gridview. (I said one of the columns as the gridview contains other columns as [Course] [Subject] [Lessons] .. Now these [course] and [subject] are simple fetch from subject_lesson table (as mentioned in my question) using the studyID and INNER JOIN to subject table. but the third column has values in database as 1,3, .... instead of this 1,3, I want to display the lesson names.... I'm not sure if I made it clear! :(
Show More