15,881,757 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 Kishor Deshpande (Top 122 by date)
Kishor Deshpande
26-Sep-14 0:35am
View
My 5!
Kishor Deshpande
20-Aug-14 0:11am
View
Check the link on answer, the folder might be read only.
Kishor Deshpande
12-Aug-14 3:10am
View
How you are passing the values in in clause?
Would like to see the ADO.NET code involing this query...
Kishor Deshpande
9-Aug-14 2:24am
View
Where is the try catch?
How we are handling the network related/ other exceptions?
Kishor Deshpande
5-Aug-14 4:21am
View
You must have got a warning while compiling this program.
Warning like: Base class method a() hides derived class method, please use new keyword if hiding is intentional.
In such scenario,
1) If you want to have the method called of object Demo1() then use virtual keyword in base class and override keyword in derived class method.
2) If you want the functionality to be like this(Calling the method of reference used to attach the object i.e. Data in this case,) , then use new keyword in derived class method, then you do not get any compile time warnings. :)
Cheers!
Kishor
Kishor Deshpande
4-Aug-14 1:57am
View
Try this: You might check with the mapping: http://stackoverflow.com/questions/57804/nhibernate-mappingexception-no-persister-for-xyz
Kishor Deshpande
4-Aug-14 1:47am
View
Why you need the last row?
Kishor Deshpande
3-Aug-14 2:32am
View
Well, to know this you should learn the concept first, you can google and get good examples :)
Kishor Deshpande
24-Jun-14 7:49am
View
Automatically?
You call methods at places where you want to log using Log4Net, isn't that automatic?
Kishor Deshpande
6-Jan-14 7:07am
View
Its a repost!
Kishor Deshpande
6-Jan-14 6:06am
View
It is a very basic question, you can see the definition in the MSDN site.
Kishor Deshpande
4-Jan-14 7:27am
View
Better you do fetch the price and quanity from database and then "totalprice" calculate in C# code and not in DB query.
Kishor Deshpande
10-Oct-13 2:35am
View
You have to programmatically configure the binding in your code.
1) Store 2 key values in config
2) In code fetch values to the key/ address you want to configure the service to and expose the service
Kishor Deshpande
23-Mar-13 4:31am
View
facing same issue, can anyone help?
Kishor Deshpande
19-Mar-13 4:26am
View
It's a repost!!!
Kishor Deshpande
9-Mar-13 2:47am
View
Can you please check access modifier of funcs1 function??
It should be public.
Kishor Deshpande
8-Mar-13 1:46am
View
Give folder permission of full access for now..
This is missing.
Kishor Deshpande
7-Mar-13 12:46pm
View
Hi Veenu,
Check link: http://www.codeproject.com/Questions/442585/operation-must-use-an-updateable-query-ms-access
For your einform application, you'll have to find out which service is trying to access your file and you'll have to add permission to the folder containing .mdb file for that service.
Check if it works..
Kishor Deshpande
7-Mar-13 5:17am
View
Can you please post complete exception message along with stack trace so that I can look into it ??
Kishor Deshpande
4-Mar-13 3:06am
View
It's a repost.
Kishor Deshpande
27-Feb-13 1:58am
View
Okay,
Go to Folder,--> right click,--> Properties.
Add a user, ASPNET.
Give full access to this user.
Your asp.net process will then have access to that file and you will not get the above mentioned error.
Thanks.
K
Kishor Deshpande
26-Feb-13 4:17am
View
My 5.
Kishor Deshpande
23-Feb-13 14:21pm
View
My 5
Kishor Deshpande
23-Feb-13 11:03am
View
Refer solution..
Kishor Deshpande
23-Feb-13 9:17am
View
That means I'll have to code, dnt worry I'll do it now :) and post it as answer.
Kishor Deshpande
23-Feb-13 9:13am
View
Have a separate key for these two databases named "back" and "items", and a static connection string property, on user selection of "Backup file", change your static connection string property to "back" key.
So it will now point to back up db.
Hope this helps.
Thanks.
Kishor Deshpande
23-Feb-13 9:08am
View
Thanks Menon Santosh :)
Kishor Deshpande
21-Feb-13 1:10am
View
Can you please avoid posting same question?
Kishor Deshpande
18-Feb-13 5:50am
View
This is repeated question, please have a look if it already exists before posting..
Kishor Deshpande
18-Feb-13 4:13am
View
Specify whether it is asp.net or winform application..
Kishor Deshpande
18-Feb-13 1:07am
View
To know which pattern should be used, you should be aware of all system specifications/ needs.
So can not be answered in short, needs more explanation.
Kishor Deshpande
11-Feb-13 1:00am
View
My 5
Kishor Deshpande
10-Feb-13 10:50am
View
My 5
Kishor Deshpande
7-Feb-13 8:39am
View
My 5
Kishor Deshpande
7-Feb-13 5:02am
View
My 5
Kishor Deshpande
7-Feb-13 4:24am
View
Well, I've posted code, try it once and let me know if you face any issue...
Kishor Deshpande
7-Feb-13 3:48am
View
Google it...
Kishor Deshpande
7-Feb-13 0:49am
View
Always use string.Empty rather than using "" for strings.
Also to check whether value of string is "" or null, use function IsNullOrEmpty();
Thanks.
Kishor Deshpande
7-Feb-13 0:01am
View
Getting error? Can you please share some exception message??
Kishor Deshpande
6-Feb-13 23:49pm
View
Make sure your web.config file is correct.
Could you please share your error message, and some code how you are fetching the connectionstring?
Unable to view webconfig code..I'll help you.
Kishor Deshpande
6-Feb-13 22:07pm
View
True, Pete is right cause bad practices are easy to learn and once you start following easy ways of getting your things done, you will never look for best practices..
Irbaz:
I appreciate that you have mentioned that it is bad practice.
Can you please update your answer with better approach rather than suggesting a solution and telling person not to follow that?
Thanks..
Kishor Deshpande
6-Feb-13 10:47am
View
My 5 :)
Kishor Deshpande
6-Feb-13 9:58am
View
Thanks Richard :)
Kishor Deshpande
6-Feb-13 9:55am
View
Deleted
Thanks Richard :)
Kishor Deshpande
6-Feb-13 9:45am
View
Well better way of doing it is to save in web.config and access it through ConfigurationManager.ConnectionStrings property.
Link: http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.connectionstrings.aspx
Fetch this value once in reusable data access component to set ConnectionString value and use it in only that component cause you are going to access database through single file :)
Let me know if you have any query..
Kishor Deshpande
6-Feb-13 9:45am
View
Deleted
Well better way of doing it is to save in web.config and access it through ConfigurationManager.ConnectionStrings property.
Link: http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.connectionstrings.aspx
Fetch this value once in reusable data access component to set ConnectionString value and use it in only that component cause you are going to access database through single file :)
Let me know if you have any query..
Kishor Deshpande
6-Feb-13 9:36am
View
Agreed and the other topic was already discussed to added link for the same in my solution.
My 5 for opening and closing connection answer :)
Kishor Deshpande
6-Feb-13 9:26am
View
My 5 :)
Kishor Deshpande
6-Feb-13 9:24am
View
My 5
Kishor Deshpande
6-Feb-13 6:26am
View
It's ok! Happy that it is now Solved :)
Kishor Deshpande
6-Feb-13 2:36am
View
Are you using forms authentication??
Kishor Deshpande
6-Feb-13 2:29am
View
What is value of session timeout that you've specified?
Are you attaching any files, may be attachment is taking more time to get uploaded..
Kishor Deshpande
5-Feb-13 10:27am
View
Thanks Abhishek for editing it. :)
I missed to add a code block for that line of code. :(
Kishor Deshpande
5-Feb-13 10:00am
View
Gopinath: Could you please upvote my answer and accept it as solution??
Thanks. :)
Kishor Deshpande
5-Feb-13 9:58am
View
panel1.Dock=DockStyle.Fill;
is the answer :)
Kishor Deshpande
5-Feb-13 9:56am
View
Jemi, you could have just modified your earlier answer, but anyways, he wants his panel to be of same size as of form not of size 200,200
Kishor Deshpande
5-Feb-13 9:50am
View
panel1.Dock=DockStyle.Fill;
Add this line of code..
Kishor Deshpande
5-Feb-13 9:36am
View
Have you tried with my solution? It maximises all the forms in your application on button click :)..
Kishor Deshpande
5-Feb-13 9:25am
View
Adding solution..
Kishor Deshpande
5-Feb-13 9:13am
View
Gopinath, do you want to make all the forms in the application to be maximised?
Kishor Deshpande
5-Feb-13 9:12am
View
It will only maximise the window containing that button and not form 1.
Kishor Deshpande
5-Feb-13 8:58am
View
Check this link: http://social.technet.microsoft.com/Forums/en/w7itproappcompat/thread/2372b329-dd1a-47b7-bd1f-41449848092a
Accepted answer suggest to install or reinstall VC++ 2008, in your case try doing it for VC++ 2010 cause the fellow was getting error for VC80 and you are getting it for VC90 :)
Let me know if you still face any issue..
Kishor Deshpande
5-Feb-13 1:18am
View
My 5.
Kishor Deshpande
4-Feb-13 4:06am
View
You can use Microsoft Visual C# 2010 Step by Step by John Sharp for reference.
Kishor Deshpande
3-Feb-13 22:02pm
View
My 5
Kishor Deshpande
3-Feb-13 21:49pm
View
So, basically you are trying to build a n-layer application in which you have DAL, BAL and Presentation layers separated.
n- tier means you have your presentation at a separate server probably a web server, Database at another and Web Services deployed on separate machine.
Kishor Deshpande
3-Feb-13 21:43pm
View
My 5.
Kishor Deshpande
3-Feb-13 8:21am
View
My 5
Kishor Deshpande
3-Feb-13 2:35am
View
My 5.
Kishor Deshpande
2-Feb-13 14:42pm
View
RegEx is the best option, to achieve this kind of functionality, you will have to customise.
My 5
Kishor Deshpande
2-Feb-13 6:33am
View
Can you please share details,
Session state mode??
Cookieless?
Kishor Deshpande
2-Feb-13 6:29am
View
Place your questions as comments and not as "Solution"...
Kishor Deshpande
2-Feb-13 3:53am
View
:)
Kishor Deshpande
2-Feb-13 3:15am
View
Mayank: ((ParentFormClassName)this.ParentForm).ControlName
//Control name is your datagridview/ textbox.
If your parentFormClassName is ParentForm, then use ParentForm there, we are just type casting the ParentForm to it's type.
OriginalGriff: Can we first try to solve Mayank's problem? we can think of following best practices later.
As I can see, Mayank is beginer level programmer and so he should know what all are the ways of getting things done, then he will choose best solution.
Kishor Deshpande
2-Feb-13 2:36am
View
you forgot ! --> condition should be:
if(!string.IsNullOrEmpty(datagridView[j, i].Value))
Then it will go enter if block if string is not null or not empty.
Kishor Deshpande
1-Feb-13 12:35pm
View
Check if you have your SessionState Cookieless=false, if it is true, you won't be able to use it across the layers..
Kishor Deshpande
1-Feb-13 9:45am
View
I've shared code of sending mail at link:
http://www.codeproject.com/Answers/538405/howplustoplusgetplusridplusofplusthepluserrorplusi#answer3
Hope it'll be useful for you :)
Kishor Deshpande
1-Feb-13 9:33am
View
You can make SendMail() as static method if you dnt wish to create instances of EmailHelper :)
Kishor Deshpande
1-Feb-13 8:57am
View
Sending email at particular date and time, Please refer links
http://code.msdn.microsoft.com/CSEmailScheduler-21564366
http://www.codeproject.com/Articles/69698/Set-the-Time-for-E-Mail-Sending-from-your-NET-Appl
Kishor Deshpande
1-Feb-13 6:40am
View
Hmm I'll answer this query after 2 hours, I'll be travelling for next 2 hours, could you please upvote my solution 1 and Accept it as answer?
Thanks.
Dnt worry I'll surely help you :)
Kishor Deshpande
1-Feb-13 6:25am
View
In your stored procedure, are you using distinct clause?
Can you show me some code of fetching values from DB?
Kishor Deshpande
1-Feb-13 6:20am
View
So if you want to send mail to all the people that are there in your database table,
you can code like this,
1) Define a method called GetAllUsers() returns List<Users>.
2) In this GetAllUsers() method, fetch the users from database using DataReader.
3) then for each user in listOfUsers, call Utilities.SendMail(user.Email,urEmailId, Subject, Message);
Kishor Deshpande
1-Feb-13 6:13am
View
Link 1 updated with simple Example from other site, please refer it.
Kishor Deshpande
1-Feb-13 6:05am
View
You want to send mail on specific events right?
Kishor Deshpande
31-Jan-13 1:28am
View
Can you explain in detail what you want to do with it?
Ideally you should not regenerate it, that too Session_End is not proper place for it.
Kishor Deshpande
30-Jan-13 11:35am
View
Hmm, List would be a better choice :)
Kishor Deshpande
30-Jan-13 6:48am
View
For 3 layered, it's not correct solution, your data access and UI are in same layer :-(
Kishor Deshpande
30-Jan-13 6:21am
View
I would suggest you to learn about Tiered architecture and Layered architecture....
Kishor Deshpande
30-Jan-13 3:34am
View
Exception message please...
Kishor Deshpande
25-Jan-13 8:26am
View
Could you please try after clearing your temp folder??
Kishor Deshpande
24-Jan-13 10:01am
View
Can you show me your method?
Kishor Deshpande
24-Jan-13 9:59am
View
Code please..
Kishor Deshpande
23-Jan-13 22:44pm
View
Hi,
Can we try one more approach?
While adding Values to DataColumn at the time of insert itself, we can have a Format() method for Strings which will before adding a value to column remove white spaces.
If you have a central method that adds DataColumn to DataRow and DataRow to DataTable, we call Format() only once.
But the existing data in database will remain as it is :(
Kishor Deshpande
23-Jan-13 12:08pm
View
You want to raise event on which instance creation?
Please share atleast some description.
Kishor Deshpande
23-Jan-13 12:06pm
View
Using <meta http-equiv="refresh" content="285" /> is an old approach :(
Kishor Deshpande
23-Jan-13 12:00pm
View
Why you want to do it in that way?
Do you want communication to happen between Application1 & Application 2??
Kishor Deshpande
23-Jan-13 3:12am
View
And how this relates to C#?
Kishor Deshpande
23-Jan-13 1:36am
View
This solution worked, try this :)
Can you please check if it works for you, if it does, can you please upvote my answer?
Kishor Deshpande
23-Jan-13 1:30am
View
Hi Brinda, I've modified Application.OpenForms.Item to Application.OpenForms[i], It's working fine for me as I've tested it on my system.
Kishor Deshpande
22-Jan-13 21:39pm
View
It's obvious that there will be performance issue cause your are dealing with [row*column] number of items. :(
Kishor Deshpande
22-Jan-13 21:36pm
View
Deleted
Hi,
In that case, you have to use for loop for each row and for each row again apply for loop and in that this particular RemoveSpace logic.
1)Add Extension method to Datatable.
2)Call RemoveWhiteSpaces() on datatable itself.
3)At RemoveWhiteSpaces() definition, Apply logic:
for each row
for each column
Trim
This will work for entire table.
But remember, in this case, time taken will be more as you are dealing with complexity of n^2.
When you will call method with this approach: tableName.RemoveWhiteSpaces(); //This is what you expect.
Kishor Deshpande
22-Jan-13 9:00am
View
var sortedItems= from element in items
orderby element.Date descending
select element;
can you try with this?
Then, first and last item display....
sortedList.Item[0]; // first item..
int count = sortedList.Count;
sortedList.Item[count-1]; //last item
Kishor Deshpande
22-Jan-13 8:55am
View
Is Date one of property in your list type SPListItem ??
Kishor Deshpande
22-Jan-13 3:06am
View
Are you using any front end to insert it? I mean Java or .NET?
Kishor Deshpande
22-Jan-13 2:03am
View
Then you should vote up this answer Vinay.
Kishor Deshpande
22-Jan-13 1:59am
View
MessageBox.Show(string.Format("No. of open Forms={0}",Application.OpenForms.Count.ToString()));
This will do I guess.
Kishor Deshpande
22-Jan-13 1:07am
View
Which concepts you want to use?
Kishor Deshpande
21-Jan-13 11:24am
View
Rather than having 40 text boxes, you can use Wizard control with validation for each wizard step.
Kishor Deshpande
21-Jan-13 11:06am
View
Why you have put comparison in while?
It's wrong boolean operation by the way.
Kishor Deshpande
21-Jan-13 6:50am
View
This answer looks correct :)
Kishor Deshpande
21-Jan-13 5:43am
View
Have you used '?' anywhere in file while declaring a variable?
Search '?' in project, I guess before starting a variable name, you've placed ? over there..
Kishor Deshpande
21-Jan-13 5:23am
View
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select name,code from emp_details where uname = @uname";
cmd.Connection=conn; cmd.Parameters.Add(new SqlParameter("@uname",str));
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
if(dr.Read()) // Checks if there is value to read.
{ name.Text = dr["name"].ToString();
code.Text = dr["code"].ToString();
}
Then might be Verbatim string issue, try above code..
Kishor Deshpande
21-Jan-13 4:49am
View
Try with this command:
SqlCommand cmd = new SqlCommand("select uname,code from emp_details where uname='" + str + "'", conn);
Kishor Deshpande
21-Jan-13 4:42am
View
http://stackoverflow.com/questions/11225127/no-value-given-for-one-or-more-parameters-with-c-sharp
Refer above url, it seems name or code is not the column name in table emp_details at DB side which you have written in command query.
You get NO VALUES error when column name at DB and query column doesn't match.
Got it I guess: SELECT UNAME, CODE instead of SELECT NAME, CODE
If yo still face issue, copy and paste error message, I'll help you.
Kishor Deshpande
17-Jan-13 12:39pm
View
This is technical forum, please post any technical questions if you have any...
Kishor Deshpande
16-Jan-13 13:27pm
View
Well in this case, you can apply a sort on datasource of your Gridview, suppose I've list to bind with GridView then,
var result = list.OrderByDescending(p => p.ProductList).OrderBy(a => a.Age)....
Kishor Deshpande
16-Jan-13 13:13pm
View
Code please...
Kishor Deshpande
16-Jan-13 9:07am
View
You have to declare Y co-ordinate, tt here is an integer value showing Y co-ordinate in your screen.
Kishor Deshpande
16-Jan-13 8:02am
View
Declare it as RadioButton.
Kishor Deshpande
16-Jan-13 6:53am
View
If you have any query, let me know, if you think this solution helps, please mark this as answer.
Kishor Deshpande
16-Jan-13 6:49am
View
You can create AddCourse(string day, string courseName) method in your data access layer which will add Courses against days in that table.
One more thing, don't make Day or Course as primary key, make both columns composite key.
Thanks.
Kishor Deshpande
16-Jan-13 6:44am
View
You can refer link: http://stackoverflow.com/questions/3360755/c-sharp-need-to-dynamically-create-radio-buttons-and-determine-which-value-user
In your case, the code will be like,
public class Course
{
public string CourseName;
public string Day;
}
foreach (Course course in courseList)
{
ii = new RadioButton();
ii.Text = course.CourseName.ToString();
ii.Location = new Point(20, tt);
tt = tt + 20;
panel1.Controls.Add(ii);
}
Show More