Hi,
I am working on a project that organizes the structure and hierarchy of departments. I want to view and display the whole structure of the organization visually, but I am stuck. I wanted to know what is the best way to do it in ASP.net 3.5; my goal is to achieve something like this by code and each node is linkable and can have CSS.
...
Hi,
What best practices and methods would you enforce on a new .NET development team?
Cheers
...
Hello Exeperts,
I am creating a csv file from my vb.net application as shown below
Dim csvFile As String = My.Application.Info.DirectoryPath & "\Test.csv"
Dim outFile As IO.StreamWriter = My.Computer.FileSystem.OpenTextFileWriter(csvFile, False)
outFile.WriteLine("Column 1, Column 2, Column 3")
outFile.WriteLin...
What are the different methods for injecting cross-cutting concerns into a class so that I can minimize the coupling of the classes involved while keeping the code testable (TDD or otherwise)?
For example, consider if I have a class that requires both logging functionality and centralized exception management. Should I use DIP and injec...
Hi there,
I have a class called CookieMonster, its objective is to simply create a cookie based on 3 parameters passed to it. The cookie name, the cookie name-value pairs and the cookie expiry date.
I have experimented with List(of T) and Array and StringCollection, but I'm unsure which is the best for passing the name-value pairs and ...
I don't think the, System.Collections.ObjectModel has any sort or order by capability.
I have a list of files and I'd like to sort by the file date.
Dim list AS System.Collections.ObjectModel.ReadOnlyCollection(Of String)
list = My.Computer.FileSystem.GetFiles("C:\SearchFolder" _
, FileIO.SearchOption.SearchByTopLevelOnly _
,...
I am very new to predicate.
just learned how to write a predicate like
Predicate<int> pre = delegate(int a){ a %2 == 0 };
what will the predicate return ?
and how is it useful when programing ?
...
I need to find a way to find the date (DD/MM/YYYY) of the Monday for any week we're on.
For example, for this week, monday would be 09/11/2009, and if this were next week it'd be 16/11/2009.
I managed to get somewhere in the forms of code, but all I got was 'cannot convert to Integer' errors. I was using Date.Today and AddDays().
Than...
Hi All,
At work we have a pretty large web application that works by having a few pages, with lots of user controls which are nested in these pages. This is working fine most of the time but we have a problem at the moment where one of the user controls isnt working. Originally it was referenced from another project in the solution but ...
I am using LINQ to SQL and a third party SDK that supports distributed transactions. When I realize that a pending update will be updating both SQL records and records in the third party SDK, I am creating a TransactionScope with a 0 (presumably infinite) timeout (although I've also tried 12 hours as a timespan parameter). Then I use G...
Is it possible to override the auto-indentation of comments in VB.NET (Using visual studio 2008)?
Please see the comment above the second Case Statement in the code below for context.
The IDE auto-indents the comment beyond the following Case Statement. I would like to override this behavior and bring it in line with the C in Case that...
This is a question that has been bugging me for a while and I am no longer working in this so sorry for the lack of code. The situation is this I had a web service that in the client and the server page it had compression and it had encryption. It didn't work all the time because there was accents and that crashed the encryption but when...
I am storing an array of a custom serializable class in session on my site. When a page on the site changes, suddenly it renders them invalid, and tells me that it can't cast the type to it's own type. I assume the class version numbers are changing or something?!
I'd appreciate avoiding the "don't use session" answers, unless it's a ...
I see lambda expressions have become a very useful tool at some points in the language. I've been using them a lot and most of the time they fit really nice and make the code shorter and perhaps clearer.
Now.. I've seen some , I would say excessive use of them. Some people like them so much that try to use them everywhere they can.. Som...
I have three condition to compare. Which one is more faster between the following two? Please point me out. Thanks all!
If var = 1 then
Command for updating database
ElseIf var = 2 then
Command for updating database
ElseIf var = 3 then
Command for updating database
EndIf
and
Select Case var
Case 1
Command for up...
I don't find a CanGrow property on the Textbox control. This is common in some other controls, and what it does is expand the control to acomodate more data. Anyway to get this feature in the TextBox?
...
I would like to have App_LocalResources folder outside web application folder, so that I could deploy updated resx files and web app. independent of each other.
Reasons: We do not want to change current deploy tool.
Any way to achieve this?
...
Hi all,
I have created a windows service in C# .net and now I want it to alert me if its going to shutdown. For this I make use of Dispose/Unload events but now I want if the services are stopping due to system shutdown process it will alert me.
So is there any way to get access to system shutdown event and execute the set of commands ...
Dim line As String
Using readFile As New StreamReader(SalesUpdateFile)
While (line = readFile.ReadLine) IsNot Nothing
i am new to vb
and everytime i run this code it gives me this error
"IS" requires an operand that have a refrence type
any help will be highly apperciated
thnx
...
I have a large .NET source tree (185 C# and VB projects, of which 60 are apps or websites) that i want to create a wix setup for. The general idea is to have 1 setup msi and to make each executable a feature, and to have each app be installed in a separate directory. like
%progfiles%/company/app1
/app2
...