vb.net

Creating a menu from the server side

I am creating my menu with javascript. How possible it is that on page load it is created from the server side (VB ASP.NET) rather than the client side? And if this is possible how is this done? My main aim is that I can create menu items from a database. Feel free to give your opinion. ...

.net - Problems with Array.Sort and Array.BinarySearch - culture and globalization

I need to sort an array containing a list of words and search the same using binarysearch. For certain reasons, the word-list must always be sorted using the sorting-rules of "en-US" i.e. American Regional Settings. The code will run under various international Operating Systems and of course this will mean that the word-list will be sor...

What components of the .Net framework should a professional developer typically avoid?

.Net is a huge framework with some functionality that appears to target beginners or becomes problematic if much customization is involved. So what functionality available in the .Net framework do you feel professional developers should avoid and why? For example, .Net has a wizard for common user management functions. Is using this fu...

Does Entity Framework/LINQ to SQL Data Binding use reflection?

Forgive me if this has been asked before; I did a search but couldn't find anything that specifically answered this question, but I'd be happy to be referred. I'm taking a peek at both the Entity Framework and LINQ to SQL, and while I like the systems (and of course the LINQ integration) I'm a little skeptical on the data-binding aspect...

[VB.Net] Stand alone executable

I am working on a relatively simple program in VB.NET. I am trying to make the installation process as simple as possible for the user. I know its possible to use the executable from the debug directory as a stand alone executable, but are there any drawbacks to this approach? For example, if the user does not have .NET on their machin...

create user form

hai i create usercontrols in vb.net txtbox,button,namelist edit grid and userform. all contrils working properly. but user form not working. how to use this userform.please give any idea. ...

How to append new node to existing node in xml

hi guys, Following is my xml file code <XMLFile> <EMail> <From> <Address>[email protected]</Address> </From> <Receipent> <To>[email protected]</To> </Receipent> <Subject>fffffsadasd</Subject> <Body>ggggasdsd</Body> </EMail> </XMLFile> i hve a sent button.On clicking that button each time i want to append Enail node and...

ASP.NET -> WCF concurrency problem

Hi, I'm developing an Ajax-based application which makes heavy use of server calls to a WCF layer that communicates with a DB. Whenever I effect from the client (an ASP.NET page) many calls within a short span of time to the underlying WCF services, the system hangs and goes into a idle state. How can I handle such concurrency problems?...

How can I query the range of date which one product has not been ordered? (LINQ)

I have three tables, Products(ProductID, ProductName) Orders(OrderID, OrderDate) OrderDetails(ProductID, OrderID) Junction table between Products and Orders. For example, there are Three ProductID in Products table A01, A02, A03 Four OrderID in Orders table 1. 01/01/2009, 2. 03/01/2009, 3. 05/01/2009, 4. 07/01/2009. OrderDetails d...

How to deliver an Excel spreadsheet over Web Service

Is it possible to deliver an Excel Spreadsheet via an Web Service. I believe not as ASP.NET web services seem only to deal in Serializable elements which the excel binary format isn't (I think). If the Excel is saved in XML format will this work? I have a number of reports that will be emailed, but the request has been put into allow th...

Problem with paging with Linq and DataTable

Hi, I'm writing a small web app in VB.NET and I would like to do paging for my DataTable in the following function : Public Shared Function Testing(ByVal KeyWord As String, ByVal CurrentPage As Integer, ByVal PageSize As Integer) As DataTable Dim db As New BibleDataClassesDataContext Dim dtDataTableOne = New DataTable...

The good way to control several threads

Hi all, I have a MDI WinForms application that can perform several tasks. Each task is running as a backgroundWorker. What is the good approach to control the running threads: check whether the specific thread is running stop specific thread ? For example it shouldn't be possible to run the same task simultaneously. May be I need ...

SQL Reader saying no values exist, query seems fine

I'm developing an ASP.NET application with VB, and using SQL Command and Connection in VB to grab the data for the page. I have both portions initialized as such: travelQuery.CommandText = "SELECT [StartLoc], [EndLoc],[TravelTime], [AvgSpeed], [Distance] FROM [TravelTimes] WHERE [TripNum] = '" + lblTrip.Text + "'" travelConnection.Conn...

What are finalisers for?

I have been programming in .NET for four years (mostly C#) and I use IDiposable extensively, but I am yet to find a need for a finaliser. What are finalisers for? ...

Dispose & Finalize for collections of properties?

I'm looking at some vb.net code I just inherited, and cannot fathom why the original developer would do this. Basically, each "Domain" class is a collection of properties. And each one implements IDisposable.Dispose, and overrides Finalize(). There is no base class, so each just extents Object. Dispose sets each private var to Nothin...

WebBrowser.Refresh problem in VB.Net

I'm working on a webcrawler in VB.net, and using the System.Forms.WebBrowser object for handling navigation on sites that use javascript or form posts, but I'm having a problem. When I navigate backwards (WebBrowser.GoBack()) to a page that was loaded with a form post, the page has expired and I have to do a refresh to resend the reques...

How to make vb.net property visible only within specific namespace?

I got some set of base classes within one namespace and few sets of derived classes in other namespaces. Everything in one project. Something like: Namespace Base Public Class BaseElement Protected Friend Readonly Property SubElements() as BaseElements End Class End Namespace ... Namespace Books Public Class Book Inherits Base.B...

Convert one line of VB.Net code to C#

Hi all, I'm looking for the C# equivalent of the line below. If New FileInfo(c:\images\test.jpg).Length < 25 * 1024 Then 'something End If Thannks for the help. ...

Linq over DataTable with .Skip() and .Take() method

Hi, I have this function that returns a DataTable : Public Shared Function GetDataTable(ByVal PageSize As Integer, ByVal CurrentPagea As Integer) As DataTable Dim dtData As New DataTable dtData = da_Book_Content.GetDataContent() 'TODO : how to do data paging for dtData with Linq Return dtData End Function On a pa...

Error conerned with web.config

hi guys, Following is the error coming while executing. Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Err...