I developed a win forms app targeting .net 2.0. All of this is in Visual Studio 2008 sp1.
I did this because I didn't really need 3.0+ features in the app. and I didn't want the clients to have to install a gigantic framework when they could just install a semi-huge one.
Well, when I create a setup project for the app, build it, instal...
Hi,
These lines cause a security exception in a godaddy account. Any suggestions how to rewrite to get this to work?
File.Delete(PropsFileName); // Clean up
TextWriter tw = new StreamWriter(PropsFileName); // Create & open the file
tw.WriteLine(DateTime.Now); // Write the date for reference
tw.WriteLine(TokenLine); // Write t...
I want to create a class with a nested enum.
public class Foo
{
public enum Views
{
}
}
However System.Reflection.Emit.TypeBuilder class has no DefineNestedEnum only DefinedNestedType. ModuleBuilder.DefineEnum exists that let's me create an enum but I find no way to make it nested. Can I create an enum without faking it ...
I want to write a program in WPF but not sure should I target .net35 or .net30. The advantages of .net35 are obvious. But still, I see one major advantage of .net30 -- it's built into Vista, so, the people using Windows Vista will not have to download and install the framework.
Do you think the advantages of .net35 outweigh the hassle o...
I am trying to boild my treeview at runtime from a DataTable that is returned from a LINQ query. The Fields returned are:
NAME = CaseNoteID | ContactDate | ParentNote
TYPE = Guid | DateTime | Guid
The ParentNote field matches a entry in the CaseNoteID column. The Select(filter) is giving me a runtime error of Cannot find col...
If I have these two classes:
class A {}
class B : A {}
and I make a List<A> but I want to add a List<B> to it by calling List<A>.AddRange(List<B>) but the compiler refuses:
Argument '1': cannot convert from 'System.Collections.Generic.List<A>'
to 'System.Collections.Generic.IEnumerable<B>
which I completely understand because IEnum...
My deployed application uses ReportViewer (CLR 3.5) to print locally reports.
Recently users noticed problem with printing.
I've investigated that and turned out that in some PC reportViewer set page format to Letter (instead A4) that's why printouts are cut.
Note all user use same network-deployed version with same ReportViewer dlls. ...
In learning the Silverlight technologies, I came across Mike Taulty's tutorial videos on using Silverlight3.0 DataForms (Click Here to check it out), and was particularly interested in the way he used data annotations in C# to do some data validation.
I have found a lot of samples on using annotations this way, but all in c# - very li...
See the code below, I don't know why my ordering is not working, any ideas?
var orderSample = new { ProductName = "", Qty = 0, UserFullName = "" };
var ordersList = (new[] { orderSample }).ToList();
//loop thru another collection and fill ordersList by adding an order at a time
ordersList.Add(new { ProductName = "Product1", Qty = 5, Us...
New day, new problem :-)
Code:
Client Side:
void abw_Closed(object sender, EventArgs e)
{
DbServiceClient sc = new DbServiceClient();
abw = (AddBlobWindow)sender;
fi = ((AddBlobWindow)sender).fi;
if ((bool)((AddBlobWindow)sender).DialogResult)
{
blob = new Blob();
binBlob = new Binary();
bina...
I built a Custom 404 CMS system in .NET 3.5, and while posting data works locally in IIS 5.1 and 6.0, it does not work on the production IIS 6.0 server. I compared the IIS 6.0 site settings item by item, and they are nearly identical, with the only differences not mattering.
I verified that the form is POST-ing to "http://domain/folder...
Suppose I have these tables:
Fruits
- FruitID INT PK
- FruitName NVARCHAR(30)
- FruitStatusID INT FK: Statuses
Statuses
- StatusID INT PK
- StatusName NVARCHAR(30)
How do I update both the Fruit's name and its status in the database in these situations?:
Update a piece of Fruit that came from a previous L2E c...
How do you disable additional checkbox selections/deselections without sacrificing the functionality of the ListView? I know you can call: ListView.Enabled = False, but that also disables any scrolling within it.
For example: I have a timer that starts a backup based on the Listview items that are checked. After a certain time, I don...
Is it bad practice to use the code-gen'ed objects from Entity Framework as business objects? Or is it better to write a secondary wrapper around Entity Framework objects that I would then pass between layers?
For example, write my own POCO Person that accepts one of my code-gen'ed Entity Framework object EFPerson to initialize the POCO ...
Given this schema:
Fruits
- FruitID INT PK
- FruitName NVARCHAR(30)
- FruitStatusID INT NULL FK: Statuses
Statuses
- StatusID INT PK
- StatusName NVARCHAR(30)
If I have a FruitID in hand (just an int, not a Fruit object), how do I update the FruitName and null out FruitStatusID without loading the Fruit object ...
I'm trying to figure out how to create a dynamic context, and what I mean by that is I have two databases: one for testing, and one for production. Depending on where my website is hosted, I want my context to be pointing at one of the two. So, in my web.config I have:
<add name="Testing_ChannelsEntities" connectionString="removed for b...
When I try my program on my win2k8 machine it runs fine but on win 2k3 it gives me this error that error message
here's the code that' generating the error
WebClient wc = new WebClient();
wc.DownloadFile("ftp://ftp.website.com/sample.txt");
have search the web for hours, couldn't find any solution.
please help
thanks
...
Hi guys as the subject i posted. I really need to know, how to get result from DDL that can automatically changes the display in the TextBox. Our each item has got more than one size and sometimes the price will be different when you click on a different size. How can I implement this function?
Any help, I would appreciated.
Here is my...
I have abstract class for each Business Object in my app (BO)
Also have parent (generic) collection to store all BOs (named BOC - Business Object Collection)
What I would like to archive is created universal method iniside BOC similar to:
public T GetBusinessObject (lambda_criteria)
So I could call this method similar to:
Employe...
I have two tables Customers, Orders
Customers
CustomerID
FName
LName
Orders
OrderId
CustomerID
OrderDate
I want to make a linq statement that can join these two tables and get
FName, LName, Count of orders for each customer
...