vb.net

For loop skipping rows in DataSet

Hi! My Application uses For...Next loops to read a spreadsheet into a DataSet and then display information from it based on the results of search conditions (search term and a date range). I'm having a problem with the data where, if I run a search that should return the first 400 rows in the spreadsheet, I'm only getting around 200 re...

2D Rendering - From Back to Front with Different Heights

I'm wondering what the best way to render a scene made up of multiple-sized tiles, from back to front, with different heights. Like this: http://www.youtube.com/watch?v=Ahfrxm6ETgA Important stuff starts at 2:35. Ignore the horrible narration. :P I'm using VB2008. So here's what I have right now: My graphics consist of bitmaps that...

Problems injecting server side variables using <%#

Hi. I was having problems inserting a string into the following tag : <tr id="rowBulkOptions" style='<%# sBulkOptionsRowStyle %>'> Don't ask why I'm using tables :) sBulkOptionsRowStyle is a Public string in the aspx.vb file. Seemingly the only way I can get this to render is to put Page.DataBind() in the Page_Load, Page_PreRende...

Information Needed regarding .Net and its application

I have seen Books on ASP.Net, VB.Net, etc... Is there any book on .NET itself? Can i take advantage of .NET using C++ or i need to know C#?? Please dont mind my question if it sounds stupid, but please do help me out! And please name a few good books for the following: VB.net .NET ASP.NET C# ...

Do you choose Linq over Forloops?

Given a datatable containing two columns like this: Private Function CreateDataTable() As DataTable Dim customerTable As New DataTable("Customers") customerTable.Columns.Add(New DataColumn("Id", GetType(System.Int32))) customerTable.Columns.Add(New DataColumn("Name", GetType(System.String))) Dim row1 = customerTable.New...

How do I insert unicode into MS-SQL ?

I want to insert info.NativeName into a nvarchar field in the database. It doesn't work, all I get is ??????? where the encoding is not western/latin. Outputting listcultures directly in an asp.net website on page_onload worked fine, but it seems not to work via database. Public Sub listcultures() 'Dim x As System.DateTime = DateTi...

Live monitoring of network connectivity status

Hi! A new client has recently asked me to develop a Windows service that will monitor whether or not his server has internet connectivity. The service should log when the connection goes down to Local Only and back up to Internet Access as shown in Network and Sharing Center. My original idea was to have the service ping a website like...

How can I embed XElements into XML literals in VB.NET?

In VB.NET I can easily embed strings into XML literals using <xml><%= "my string" %></xml>. How can I embed an XElement instance? I know I can use methods on the XElement, XNode, etc classes, but I'd like to do it in the XML literals if possible. ...

Late binding operations cannot be converted to an expression tree with LINQ

I currently have a View in MVC where I pass a single set of data to the view. However, I've come across a problem where I am having to use a LINQ query within a For Each loop in the View to pull out additional information from a SQL View of data from another DB. The error I'm getting is Late binding operations cannot be converted to an ...

Visual Studio: Edit XAML file while debugging

The title says it all: I have a WPF application running in debug mode, and I would like to change the XAML while the application is still running. I'm not asking for Edit-and-Continue. I don't mind that I will have to restart the application for the changes to become effective. I just want to be able to make changes to the XAML file whi...

Is there a free SQL formatting library for .NET?

Hey, All: I've been looking for a free library/source code to format SQL queries, preferably in .NET, for quite a while. Even after searching some of the responses here on SO, I'm almost at the point where I'm willing to believe that nothing like this exists. The closest thing I've found, a project called sqlformat, does not seem to b...

Fincontrol in gridview for Checkbox checked is not working

<asp:BoundField DataField="mail" SortExpression="mail" HeaderText="Com Rec"> <HeaderStyle Font-Size="X-Small" ForeColor="White" HorizontalAlign="Left" /> <...

VB.NET shell open PDF to a specific page

How do I open a pdf file to a specific page within the pdf. Below is a link to some of the open parameters when using command line: PDF Open Parameters ...

how to query XML document using Linq to XML to find a child node with particular attribute, for any no of child nodes.

how to query XML document using Linq to XML to find a child node with particular attribute, for any no of child nodes. ...

Find an item in an List(Of T) by values x,y,z

I have the following setup Class A property x as string property y as int property z as String End Class Class CollOfA inherits List(Of A) End Class What I would like is a Item property in the collection that I can say dim c as new CollOfA c.item("this", 2, "that") I have tried implementing the following in CollOfA C...

Passing parameters to a subroutine from a WPF button

I have a VB.net WPF application that creates a list from a databind. For each row in the databind, it generates a textblock that displays the information from different fields in the databind. It also generates a button which I would like to run a subroutine when clicked. When I click the button, I want it to be able to get the informat...

ASP.NET MVC: Tracking Page Views and view Duration

I have an application I'm currently working on that requires Administrators to be able to track the views of a ticket and it's duration. I've got the tracking of the number of views by users sorted out, I have a table that contains a TicketID, UserID and a DateOpened. Each time a user visits the page, a new row will be inserted. Howeve...

asp.NET how to change Session Language?

Hello all, I am new to this and would like to create a few simple hyperlinks that change the session language parameter. Then I will test against this parameter to show dynamically different page elements. I have not been able to find any sort of tutorial discussing a simple solution for this, only full blown tutorials that are in dept...

How to get interger quotient when divide two values in c#?

I want get integer quotient when I divide two values. Per example X=3 Y=2 Q=X/Y = 1.5 // I want get 1 from results X=7 Y=2 Q=X/Y=3.5 //I want get only 3 from results ...

Efficiently assign cell properties from an Excel Range to an array in VBA / VB.NET

In VBA / VB.NET you can assign Excel range values to an array for faster access / manipulation. Is there a way to efficiently assign other cell properties (e.g., top, left, width, height) to an array? I.e., I'd like to do something like: Dim cellTops As Variant : cellTops = Application.ActiveSheet.UsedRange.Top The code is part of a ...