9,868,710 members (31,428 online)
Visit CodeProject.TV
Discuss CodeProject.TV
Sign in
Email
Password
Forgot your password?
Sign in using
home
articles
Chapters and Sections
>
Search
Latest Articles
Latest Tips/Tricks
Top Articles
Beginner Articles
Technical Blogs
Posting/Update Guidelines
Article Help Forum
Article Competition
Submit an article or tip
Post your Blog
quick answers
Ask a Question
View Unanswered Questions
View All Questions...
C# questions
ASP.NET questions
VB.NET questions
C#4.0 questions
C++ questions
discussions
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work & Training Issues
Design and Architecture
ASP.NET
JavaScript
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
Adobe Technologies
C#
Free Tools
Objective-C
Ruby On Rails
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
.NET Framework
Mobile
VS 11 & .NET 4.5
Sharepoint
Silverlight / WPF
Visual Basic
Web Development
Site Bugs / Suggestions
features
Component & Service Catalog
Competitions
News
The Insider Newsletter
Newsletter archive
Surveys
Product Showcase
Research Library
CodeProject Stuff
community
The Insider News
The Lounge
The Weird & The Wonderful
The Soapbox
Press Releases
Who's Who
Most Valuable Professionals
Company Listings
Non-English Language
>
General Indian Topics
General Chinese Topics
help
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
Site Map
Advertise with us
Employment Opportunities
About Us
The default search term operator is
AND
.
You can use brackets,
AND
,
OR
, and
NOT
to improve your search. For example:
C# AND NOT(VB or SQL)
A query of a single
*
will return everything, filtered by any filters.
Filter examples:
Search by Author
author:"author name"
Filter by tag
tag:C#
or
tag:(C++ or Java)
Wildcard search
use "?" or "*" eg.
gr?d
or
gr*
104 Results
Search
Everything
Articles
Technical Blogs
Tips & Tricks
Questions
Answers
Forum Messages
News Items
Catalog Items
Videos
Training Courses
Just My Stuff
My Bookmarks
Sort by
Relevance
Rating Asc
Rating Desc
Title Asc
Title Desc
Author Asc
Author Desc
Date Created Asc
Date Created Desc
Date Modified Asc
Date Modified Desc
Price Asc
Price Desc
Duration Asc
Duration Desc
Match
All Fields
Title
Description
Author(s)
Tags
Any Date
Last 12 hours
Last 24 hours
Last week
Last 2 weeks
Last month
Last 3 months
Last 6 months
Last year
January
February
March
April
May
June
July
August
September
October
November
December
Rating Range
All - Including Unrated
1.0 - 5.0
2.0 - 5.0
3.0 - 5.0
4.0 - 5.0
4.5 - 5.0
4.8 - 5.0
5.0
Advanced Filters:
Article Topics
All Topics
Desktop Development
Web Development
Mobile Development
Cloud Computing
Enterprise Systems
Database
Multimedia
Languages
Platforms, Frameworks & Libraries
General Programming
Graphics / Design
Development Lifecycle
General Reading
Third Party Products
Mentor Resources
Article License
All Licenses
CPOL
CDDL
Ms-PL
MPL
CPL
Eclipse
MIT
BSD
Apache
CC (ASA 2.5)
Zlib
Public Domain
CC (Attr 3U)
CC (ASA 3U)
LGPL3
GPL3
Forums
All Forums
Feature Forums
General Programming
Web Development
Product Lifecycle
Database & SysAdmin
General Discussions
Non-English Language
Catalog Category
All Categories
Books & Training
Charting & Graphing
Components, Controls, Libraries
Data Manipulation & Mining
Database Tools
Debugging
Documentation & Help
Financial, Math & Scientific
Frameworks & APIs
General Development Tools
GIS & Maps
Graphics & 3D Modeling
Hardware and Robotics
Hosting
IDEs
Imaging
Mobility
Multimedia
Networking
Performance and Profiling
Programming Languages
Project Life-cycle Management (ALM)
Reporting
Search
Security
Setup & Deploy
System Adminstration
Utilities
Virtualization
Web Design/Development
Catalog License
All Licenses
Commercial
Fully Function Evaluation version
Limited Functionality Trial
Limited Time Trial
Shareware
Free For Personal Use
Freeware
Page 1 of 3
Page Size:
10
·
25
·
50
Author filtered by: Pheonyx
[x]
How to get WPF Menu items names when window loaded?
by
Pheonyx
Answer
14 May 2013
license:
CPOL
There are various approaches you could take to achieve this.one could be to do a foreach loop on the form.controls collection where you are searching for a control of type MenuItem, then collect the name property from it and put that in an array. Then when you want to retrieve a control you...
General Programming
»
Uncategorised Quick Answers
»
General
WPF
i want to show the faculty rating from the database using sql server
by
Pheonyx
Answer
14 May 2013
license:
CPOL
You issue is this:FacId varchar(40) as a result when you do this:ON F.facid = B.facid you are trying to compare a Varchar(40) with a Bigint which you cannot. Hence your error.
General Programming
»
Uncategorised Quick Answers
»
General
C#
how to validate datetimepicker value changed in C#
by
Pheonyx
Answer
14 May 2013
license:
CPOL
you cannot do a logical comparison on an event.ValueChanged is an event on the control not a property.Hence your error.
General Programming
»
Uncategorised Quick Answers
»
General
C#
Save data from textbox to entity framework model
by
Pheonyx
Answer
13 May 2013
license:
CPOL
This article was linked in todays CodeProject news letter, it might give you some hints and tips on how to achieve what you are after:http://endyourif.com/entity-framework-beginners-guide-done-right/[^]
General Programming
»
Uncategorised Quick Answers
»
General
C
Framework
entity
WinForm
Entities
Skip Reading Specific Number Of Lines (Using StreamReader)
by
Pheonyx
Answer
13 May 2013
license:
CPOL
Your issue, I believe relates to the fact that Skip uses defered execution.(see remarks on the following link)http://msdn.microsoft.com/en-us/library/bb358985(v=vs.90).aspx[^]I would suggest breaking the code down a bit:IEnumerable allines =...
General Programming
»
Uncategorised Quick Answers
»
General
C#
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
by
Pheonyx
Answer
13 May 2013
license:
CPOL
You are not setting the Array list to have any objects.You should change your code to do something similar to this:if(MyData.Count
General Programming
»
Uncategorised Quick Answers
»
General
C#
Usercontrol growing beyond its container
by
Pheonyx
Answer
10 May 2013
license:
CPOL
Ahh, I found my issue.It was actually further down in my user control.For those that are interested I was using stackpanel to contain my listbox.As the listbox grew so did the stackpanel (which is how it is meant to behave). However the stackpanel does not stop growing when it reaches...
General Programming
»
Uncategorised Quick Answers
»
General
XAML
WPF
User-controls
Usercontrol growing beyond its container
by
Pheonyx
Question
10 May 2013
license:
CPOL
Hi guys,I have an issue that I don't know how to resolve.I am building a WPF C# application using a MVVM approach (well trying).I have a container window that has a menu on the left hand side, on the right different views are loaded depending on which menu option is...
General Programming
»
Uncategorised Quick Answers
»
General
XAML
WPF
User-controls
text with double quotes is not inserting in databse in sql server
by
Pheonyx
Answer
9 May 2013
license:
CPOL
How are you inserting the text to SQL. If you are not already I would suggest using a parametrised query as this should overcome that issue.
General Programming
»
Uncategorised Quick Answers
»
General
C#
How do i pick the longest time and the shortest time taken from the array
by
Pheonyx
Answer
9 May 2013
license:
CPOL
I think you are better off doing something like this:Dim elapsedTimeList As New List(Of TimeSpan) elapsedTimeList.Add(sw.Elapsed)Then you can use Linq to get the largest and smallestdim min as timespan = elapsedTimeList.Min();dim max as timespan =...
General Programming
»
Uncategorised Quick Answers
»
General
VB
VB.NET
How can i bind a Staticresource in return ivalueconverter
by
Pheonyx
Answer
9 May 2013
license:
CPOL
This might give you a starting point,http://stackoverflow.com/questions/14259262/implementing-ivalueconverter-to-convert-string-to-image[^]You will want to look at how to access resources within a resource dictionary through code as well because that will be how to retrieve the image.
General Programming
»
Uncategorised Quick Answers
»
General
C#
WPF
VB
VB.NET
WCF MaxReceivedMessageSize Exception
by
Pheonyx
Answer
8 May 2013
license:
CPOL
Break it down into chunks. It is only the individual message size limit that is being reached so, if for example you are transmitting a collection of data, send it in chunks rather than all at once.
General Programming
»
Uncategorised Quick Answers
»
General
WCF
WPF
MVVM
How to archive tables in a database and add to another database?
by
Pheonyx
Answer
8 May 2013
license:
CPOL
Yes it should be possible.Have a read of the following links they should provide a good starting...
General Programming
»
Uncategorised Quick Answers
»
General
C#3.0
C#
SQL-Server
SQL2008
How to Remove comma if the cell is empty?
by
Pheonyx
Answer
8 May 2013
license:
CPOL
Somthing like this might do the job:private string CellCombination(IEnumerable values){ string result = ""; foreach (string s in values) { if (!string.IsNullOrWhiteSpace(s)) result += string.Format("{0},", s); } return result.Trim(',');}Or the same...
General Programming
»
Uncategorised Quick Answers
»
General
C#
Must Declare a Scalar Variable C#
by
Pheonyx
Answer
8 May 2013
license:
CPOL
try{ DataTable dt = new DataTable(); con.Open(); string qry1 = " SELECT * from Stock WHERE (ProductName LIKE @ProductName)" ; SqlDataAdapter da = new SqlDataAdapter(qry1, con); da.SelectCommand.Parameters.AddWithValue("@ProductName" , cmbProductName.Text); ...
General Programming
»
Uncategorised Quick Answers
»
General
C#
SQL-Server
Must Declare a Scalar Variable C#
by
Pheonyx
Answer
7 May 2013
license:
CPOL
I believe your issue is here:da.SelectCommand.Parameters.AddWithValue("@ProductName", cmbProductName.Text);You need to change it to:com.Parameters.AddWithValue("@ProductName", cmbProductName.Text);As it is the com you are executing and not the data adapter.
General Programming
»
Uncategorised Quick Answers
»
General
C#
SQL-Server
WCF Self Hosting Problem related to endpoint address
by
Pheonyx
Answer
7 May 2013
license:
CPOL
Try reading this link, was the first link when googling "WCF error code 10061" http://social.msdn.microsoft.com/forums/en-US/wcf/thread/58e420e9-43a3-4119-b541-d18158038e36/[^]Based on the information you provided that looks like it could be same issue and there are various solutions...
General Programming
»
Uncategorised Quick Answers
»
General
.NET3.5
C#
.NET
To find which sql server install in computer to registry key
by
Pheonyx
Answer
7 May 2013
license:
CPOL
You could look at the following links, combine the information and you should be able to achieve what you are...
General Programming
»
Uncategorised Quick Answers
»
General
VB
VB.NET
Configure WCF-Service / IIS 7.5 to use only https binding.
by
Pheonyx
Answer
7 May 2013
license:
CPOL
You said you've tried a few things, have you read this article and tried its approach?Seven simple steps to enable HTTPS on WCF WsHttp bindings[^]
General Programming
»
Uncategorised Quick Answers
»
General
C#
WCF
.NET
.NET4
IIS7.5
How to update a varchar column with date variable
by
Pheonyx
Answer
7 May 2013
license:
CPOL
I think you need to change:v_startdt.AddDays(v_adddays).ToString();to be v_startdt.AddDays(v_adddays).Date.ToString(@"dd/MM/yyyy");Also, I would advise looking up how to use parameters in your SQL queries to prevent against SQL...
General Programming
»
Uncategorised Quick Answers
»
General
C#
how to find 'enddate' after adding some days to a 'startdate'
by
Pheonyx
Answer
7 May 2013
license:
CPOL
1) I would not use Textboxes instead use DateTimePickers for the date information.2) Use a NumberUpDown for the number of days to increment by.So you have 3 controlsDateTimePicker StartDateDateTimePicker EndDateNumberUpDown NoOfDaysEndDate.Value =...
General Programming
»
Uncategorised Quick Answers
»
General
C#
need help in creating company code
by
Pheonyx
Answer
7 May 2013
license:
CPOL
You could have a separate table that stores the next companyNumber to use. then append that to the end of the string. If you did this in SQL when you insert the record it would prevent multiple clients getting the same number.Each time the InsertCompany statement runs, you read the current...
General Programming
»
Uncategorised Quick Answers
»
General
Windows
WPF
VB
VB.NET
SQL2008R2
what is wrong with this method all the time when i call it and give it list and index to get value tell me out of range
by
Pheonyx
Answer
3 May 2013
license:
CPOL
First thing, Arrays start at 0, not 1 so changefor (int i = 1; i
General Programming
»
Uncategorised Quick Answers
»
General
C#
Passing the database value by using Session and redirect to another page
by
Pheonyx
Answer
3 May 2013
license:
CPOL
Try changing:BthID = TxtBthNo.Text.ToString().Trim();To BthID = Convert.ToInt64(TxtBthNo.Text.Trim());
General Programming
»
Uncategorised Quick Answers
»
General
C#
i want to read row by row is it right like that
by
Pheonyx
Answer
3 May 2013
license:
CPOL
Test it, but at a quick look yes it should show the ID value for each row in your list.
General Programming
»
Uncategorised Quick Answers
»
General
C#
Sorting a datagridview in winforms c#
by
Pheonyx
Answer
3 May 2013
license:
CPOL
https://www.google.co.uk/search?q=implement+sorting+to+datagridview+in+winforms+c%23&aq=f&oq=implement+sorting+to+datagridview+in+winforms+c%23&aqs=chrome.0.57j62.473j0&sourceid=chrome&ie=UTF-8[^]
General Programming
»
Uncategorised Quick Answers
»
General
C#
WinForm
List of Application in Applications Tab in Task Manager
by
Pheonyx
Answer
2 May 2013
license:
CPOL
Have a read here:http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/60affc28-364a-4a8a-8f03-ec976918c2ca[^]They appear to be attempting to do the same thing, there are some ideas you could try.
General Programming
»
Uncategorised Quick Answers
»
General
C#
.NET
Remove sql injection
by
Pheonyx
Answer
2 May 2013
license:
CPOL
Have a read up on SQL Parameters.http://www.dotnetperls.com/sqlparameter[^]http://csharp-station.com/Tutorial/AdoDotNet/Lesson06[^]
General Programming
»
Uncategorised Quick Answers
»
General
.NET3.0
C#
.NET
Problem in assigning keyboard shourtcuts to button
by
Pheonyx
Answer
2 May 2013
license:
CPOL
When you load the UserControl set the focus to it. The Key Press event is a bubble event that travels from the currently focused control down the control tree. So if the user control is loaded but not has focus then a control beneath it will receive the key press bypassing it.At least based...
General Programming
»
Uncategorised Quick Answers
»
General
WPF
VB
VB.NET
Help on code conversion
by
Pheonyx
Answer
2 May 2013
license:
CPOL
Remove these two lines: Debug.Fail("ERROR : We should never get to AddToCart.aspx without a ProductId."); throw new Exception("ERROR : It is illegal to load AddToCart.aspx ...
General Programming
»
Uncategorised Quick Answers
»
General
C#
LINQ
VB
VB.NET
convert
How to implement background process
by
Pheonyx
Answer
2 May 2013
license:
CPOL
I would suggest using the Background Worker class.An example is here BackgroundWorker Class Sample for Beginners[^]But if you google it there are alot of other really good tutorials.
General Programming
»
Uncategorised Quick Answers
»
General
C#
WCF
how to fetch database value by combobox selectionchange
by
Pheonyx
Answer
2 May 2013
license:
CPOL
Solution Guide 2:Dim sql as String = "Select * From Company Where CompanyName=@CompanyName"Dim objDA As System.Data.SqlClient.SqlDataAdapter = _ New System.Data.SqlClient.SqlDataAdapter(sql, connection)objDA .Parameters.Add("@CompanyName",...
General Programming
»
Uncategorised Quick Answers
»
General
Windows
WPF
VB
VB.NET
SQL2008R2
how to fetch database value by combobox selectionchange
by
Pheonyx
Answer
1 May 2013
license:
CPOL
I would do something similar to the following:Dim cmd3 As New SqlCommand("select * from Company Where CompanyName=@companyname", connection)cmd3.Parameters.Addwithvalue("@companyname", mycombobox.SelectedValue)cmd3.ExecuteNonQuery()Dim da As New SqlDataAdapter(cmd3)da.Fill(dt)if...
General Programming
»
Uncategorised Quick Answers
»
General
Windows
WPF
VB
VB.NET
SQL2008R2
Listview templates not applying
by
Pheonyx
Question
1 May 2013
license:
CPOL
Hi guys,So I am working on a routine that validates and imports some data between two systems.both routines output their results into a list of objects and I am trying to bind to this list in my GUI.What I would like to achieve is that each type of result, be it a validation result...
General Programming
»
Uncategorised Quick Answers
»
General
WPF
DataTemplate
get name of sqlserver in network an copy to textbox
by
Pheonyx
Answer
1 May 2013
license:
CPOL
Have you even done any research?It took about 2 seconds of typing into google and found this:http://social.msdn.microsoft.com/Forums/en-US/sqlsmoanddmo/thread/fda283ef-5a8b-424d-b549-074ccc19c8d7[^]Start here and see where you get.
General Programming
»
Uncategorised Quick Answers
»
General
C#
Bind .net framework with exe/setup
by
Pheonyx
Answer
1 May 2013
license:
CPOL
Build a Setup Project and make the .Net framework a pre-requisite. This will install the .Net framework / prompt you to install it. Then install your application.http://support.microsoft.com/kb/307353[^]
General Programming
»
Uncategorised Quick Answers
»
General
C#
.NET
VB
VB.NET
How to validate whether the student id is exists in database or nor
by
Pheonyx
Answer
1 May 2013
license:
CPOL
Assuming the actual SQL statement you are trying to run is correct I would change your code as follows:SCon.Con.Open(); string str = "Select count(*) from Studdet where studid = @studid"; SqlCommand cmd = new SqlCommand(str, SCon.Con); cmd.Parameters.AddWithValue("@studid",...
General Programming
»
Uncategorised Quick Answers
»
General
C#
Central Database Problem
by
Pheonyx
Answer
30 Apr 2013
license:
CPOL
There are various options to you, and this is a very broad approach to things.It also depends how you want to operate.If the sites do not need 100% up to date information then you could use Data Synchronisation approaches:Choose a Data Synchronization Technology[^]If they do need...
General Programming
»
Uncategorised Quick Answers
»
General
C#
SQL
database
Solution
problem
Shared
How To Save datagridview image column in sql server 2008 database using WinApp C# ?
by
Pheonyx
Answer
30 Apr 2013
license:
CPOL
Change 33 to 31 and give that ago.Sorry mean change it to 32 not 31.The reason for this is that indexes in c# start at 0 and not at 1, so in order access column 33 you need to pass index 32.
General Programming
»
Uncategorised Quick Answers
»
General
.NET
C#
C#4.0
sqlserver2008
To integrate an image in a button with a style
by
Pheonyx
Answer
30 Apr 2013
license:
CPOL
Kenneth is correct, your Style overlays ontop of the original backgroundI'm not sure if which of these you need but if you force their background to be from the parent then it should resolve the issue. CornerRadius="10,10,10,10" ...
General Programming
»
Uncategorised Quick Answers
»
General
C#
XAML
WPF
splitting in details section in crystal report
by
Pheonyx
Answer
30 Apr 2013
license:
CPOL
Try looking here:http://www.ehow.com/how_6530417_use-grouping-crystal-reports.html[^]OrStep by Step Creation of Crystal Report using its Features Group, Graph, Cross-Tab and Sub Report[^]
General Programming
»
Uncategorised Quick Answers
»
General
C#
Validate the student id
by
Pheonyx
Answer
29 Apr 2013
license:
CPOL
In the textbox validating event query the database (unless you already have the data in memory) for an entry with the given ID. If it returns nothing then there is no entry. If it returns something then it is valid. And you already have the students info in memory if you need it.
General Programming
»
Uncategorised Quick Answers
»
General
C#
how to resolve error in crystal report?
by
Pheonyx
Answer
29 Apr 2013
license:
CPOL
Have you installed the 32bit runtime? And is your program set to compile to "Any CPU" or have you chosen a specific one? If you haven't chosen one, try setting it to x86.
General Programming
»
Uncategorised Quick Answers
»
General
C#
.NET
C#4.0
.NET4
CrystalReports
Application Closes after Wizard Form is closed instead of showing main window
by
Pheonyx
Answer
29 Apr 2013
license:
CPOL
Solution was devised with the help of Johannesnestler. Moved the initial creation of the main form to the start of the method, but kept the show at the end after the configuration check.Kudos to Johannesnestler for the help.
General Programming
»
Uncategorised Quick Answers
»
General
C#
WPF
Application Closes after Wizard Form is closed instead of showing main window
by
Pheonyx
Question
29 Apr 2013
license:
CPOL
Hi Guys,So I have created an application that has a custom OnStartUp event handler.The code within which is similar to this:m_ConfigurationManager = ConfigurationManager.InitializeInstance(Assembly.GetExecutingAssembly().GetName().Name, Code.StringToSecureString());if...
General Programming
»
Uncategorised Quick Answers
»
General
C#
WPF
Getting CRAZY with ComboBox SelectedItem
by
Pheonyx
Answer
26 Apr 2013
license:
CPOL
Your issue is here:public void Populate(){ ProcessInstance selectedItem = m_SelectedItem; SelectedItem = null; Items = null; List processInstances = new List(); foreach (Process process in Process.GetProcesses()) { ...
General Programming
»
Uncategorised Quick Answers
»
General
C#
.NET
XAML
WPF
Binding
Lamba Expression to invoke a Method
by
Pheonyx
Answer
26 Apr 2013
license:
CPOL
The solution here:Linq Query - Call Method.[^]might solve your issue.
General Programming
»
Uncategorised Quick Answers
»
General
LINQ
C#
C#4.0
How to request to element label?
by
Pheonyx
Answer
25 Apr 2013
license:
CPOL
With a bit of casting you could do the followingFor(int i = 0; i
General Programming
»
Uncategorised Quick Answers
»
General
C#
how to send email using C#.net
by
Pheonyx
Answer
23 Apr 2013
license:
CPOL
Try some initial research, there are various approaches you can take depending on the context of your e-mail system.http://bit.ly/11gXx2Z[^]
General Programming
»
Uncategorised Quick Answers
»
General
C#
C#4.0
get substring of selected value of combobox on selection changed event
by
Pheonyx
Answer
18 Apr 2013
license:
CPOL
Your error, I would guess, occurs on one of these three lines:string sub1 = (Convert.ToString(dateTimeDate.Value)).Substring(3, 2); string sub2 = (Convert.ToString(dateTimeDate.Value)).Substring(8, 2); orsub = (Convert.ToString(sub)).Substring(0, 3);Before you attempt any substring...
General Programming
»
Uncategorised Quick Answers
»
General
C#
C#4.0
WinForm
Page 1 of 3
1
2
3
First
·
Prev
·
Next
·
Last
Advertise
|
Privacy
|
Mobile
Web03 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright ©
CodeProject
, 1999-2013
All Rights Reserved.
Terms of Use
Layout:
fixed
|
fluid