Hi,
I have a solution with multiple projects. In each project I've added a .config file with settings that affect the local settings.
When I tried to read the settings for the database connection, I got some values which I don't know where they come from.
This is the .config file of DatabaseLayer Solution:
<configuration>
<configSect...
Hi,
Could anyone notice what could be wrong with the following function:
public string Login(string username, string password)
{
string result = "";
string select = "SELECT user_id FROM [user] WHERE username = @username AND password = @password";
SqlConnection conn = new SqlConnection(connectionString);
...
Hello,
I am capturing images from a smart camera imager and receiving the byte array from the camera through socket programming (.NET application is the client, camera is the server).
The problem is that i get System.InvalidArgument exception at runtime.
private Image byteArrayToImage(byte[] byteArray) {
if(byteArray != null) {
...
I always used (a)Nullable<>.HasValue because I liked the semantics. However, recently I was working on someone else's existing code base where they used (b)Nullable<> == null exclusively instead. Is there a reason to use one over the other, or is it purely preference?
(a)
int? a;
if(a.HasValue)
...
(b)
int? b;
if(b != null)
...
Hello,
I'm writing a C# application which has IronPython (2.0.1) embedded in it. The idea is to expose portions of the application to the IronPython scripts, which the users write.
I want to provide the ability to the users to be able to debug the scripts written by them, using the Visual Studio Debugger. Note that the scripts are run...
Is there a way to find out if the calling function had attributes set on it?
[RunOnPlatformB]
int blah()
{
return boo();
}
int boo()
{
// can i find out if RunOnPlatformB was set on my caller?
}
...
I have a page that display of all News in a database, which I get with function
IList<News> GetAll();
I then bind the list to a repeater to display all the news. If a user clicks on news N, he is redirected to page.aspx?id=N
If the QueryString["id"] is set, then I get one of my News like this:
News news = sNewsService.Get(int.Parse(...
I am starting to explore LINQ to Objects but want to know how application design can best accommodate LINQ to Objects.
As an example .... an application displays female employees only and the employee table in the database contains data for both male and female employees.
By default, the application builds a SQL statement to retrieve ...
Possible Duplicate:
IList<T> to IQueryable<T>
I have a List data, but I want a IQueryable data , is it possible from List data to IQueryable data?
Show me code
...
i need to refresh UpdatePanel3'content , but if i click first btnTranslate , it doesn't work, but second click it works?
<asp:Button ID="btnTranslate" runat="server" OnClick="btnTranslate_Click" Text=">>"
class="buttons" ValidationGroup="ValidForm" />
</td>
<td>
...
Good morning,
is there a way to get a DriveInfo instance for UNC paths (e.g. "\fors343a.ww123.somedomain.net\folder\1\") because for example...
var driveInfo = new System.IO.DriveInfo(drive);
... throws an ArgumentException ("Object must be a root directory (\"C:\\") or a drive letter (\"C\").") when using that UNC path above.
What...
I have a set of functions I want to be available to my web pages and user controls in my c# .net 3.5 web project. My standard approach for pages is to create a "base page" that extends the System.Web.UI.Page class and then have my pages inherit from this, rather than directly from the Page class.
I now want to expose some of these funct...
How would I clear the TreeView selection within a WPF TreeView? I have tried looping through the TreeNodes and clearing the IsSelected property however that is a ReadOnly property. Any ideas?
The TreeView is using XML Binding through the XMLDataProvider object.
...
How can I databind a gridview to an arraylist in .NET?
I am using .NET 3.5 and Visual Studio 2008.
...
Hi,
I would like to determine the IP address of a printer, using C# (.NET 2.0). I have only the printer share name as set up on the Windows OS, in the format \\PC Name\Printer Name. The printer is a network printer, and has a different IP address to the PC. Does anyone have any pointers?
Thanks in advance for your help.
Regards, Andy....
hi
how to display list of items in list box while choose a particular item in dropdown list.
ex: thiru is a developer he done some modules.
in dropdown list has a list of developers while choose thiru in this list i want to display a what are all the modules completed by thiru that can be listed in listbox
I am using Vis...
Hi,
I want to enumerate dictionary. How i enumerate.
Thanks
...
Hello,
One of my users had a single error while opening a file (I'm using standard xml 1.0):
The remote name could not be resolved: 'www.w3.org'
I found a post here in StackOverflow that deals with this and it suggest setting the XmlResolver property to null. I've tried this, and all my documents still seem to load fine. However, the...
Given that they generate the Create, Read, Update, and Delete (CRUD) functionality for you in most cases, does this imply that stored procedures won’t be used as often? If these methods use LINQ then that means no stored procedures are used, correct?
Any clarification is greatly appreciated.
...
My company is currently in the process of creating a large multi-tier software package in C#. We have taken a SOA approach to the structure and I was wondering whether anyone has any advice as to how to make it extensible by users with programming knowledge.
This would involve a two-fold process: approval by the administrator of a produ...