vb.net

Enclose values in double quotes in VB.net

Hello, I have this string in vb.net. I would appreciate if you can let me know how I can enclose the values in double quotes dim str as string="" str.Append("EmpID=" & empNo & " DeptID=" & deptID & "") I want the value of string to be EmiID="10" DeptID="20" Thanks ...

LINQ VB.NET variable not found when looping through grouped query

I'm trying to do the following LINQ grouping, which works in the debugger (the results are populated in the GroupedOrders object. But VS 2008 gives me the following error at design time... Name 'x' is not declared Dim GroupedOrders = (From m In thisConsultant.orders _ Group m By Key = m.commCode Int...

Making Class methods instead of Instance Methods in VB.NET

I am not sure how clear my question is by the title, but I am trying to make Class methods instead of Instance methods in Visual Basic that way I don't have to waste memory and code creating temporary objects to execute methods that don't need instance variables. I am not sure if you can do that in VB but I know you can in Objective-C b...

What exactly is the "Multi-threaded Debug DLL" Runtime Library option doing in VS 2008?

I have a solution in VS 2008 that creates a DLL. I then use that DLL in another application. If I go in to the DLL projects property pages and change the following configuration for a DEBUG build then the built dll no long provides the desired functionality. If I change it back and rebuild the DLL, then the DLL does provide the correc...

Databind' is not a member of 'CrystalDecisions.Windows.Forms.CrystalReportViewer'

Hi, ive being trying to cope with this problem but still. I need your help. Im having the following error message: Databind' is not a member of 'CrystalDecisions.Windows.Forms.CrystalReportViewer' in my code: Dim rpt As New CrystalReport1() Dim da As New SQLiteDataAdapter Dim ds As New presbydbDataSet ...

Update Panel error: Control with the ID "xxx" could not be found in the UpdatePanel

I have a composite drop down calendar user control that consists of a textbox and and calendar image and a validation control. I expose a property called "TextBox" on the usercontrol which returns a reference to the textbox used within the control. This is the textbox that the user enters the date into. In the ASPX page, I have an insta...

javascript for saving the message automatically .

I have a asp htmleditor where the user will enter any text or a message...is there any javascript to save the message every 5 seconds as drafts in vb.net . ...

Is there a measurestring equivalent in Silverlight xaml?

What I am trying to accomplish: Create a dynamic bubble that expands on height and width depending on the amount of text in the bubble. What I researched so far: In a SO article they described utilizing the measurestring function to figure out the exact width or height so dynamic changes in the .cs to the width and height can be accompl...

how do I set folder share programmatically in vb.net

I have Client-Server environment and developed a project for Client-Server. I need to share a folder of my Server machine programmatically using VB.NET Please help me. ...

UI Testing Automation Tool

Hi, I am currently having Desktop application developed in VB. But there are many UI changes that are made to this application. So i wanted to Automation tool which will compare the Images that are received from the Client with the actula application images, and tell the strings missing, or font is differrent from the images received a...

How to programmatically determine name of CKEditor instance

I've added a CKEditor instance programmatically to my page in the code-behind of my ASP.NET page: VB.NET: itemEditor = New CkEditor cell.Controls.Add(itemEditor) ... which works fine. I can get the HTML on the postback and do stuff with it. However, I also want to do some client-side stuff with it, specifically take a selected item...

NetworkService permission (multi-language)

So, I'm doing a setup project, all written in VB.NET, and I need to give to the NetworkService account, permission on a certain folder. The following code works perfect (Windows 7 - en-US): Dim dInfo As New DirectoryInfo("C:\FolderOrFileToGivePermission") Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl() dSecurity.AddAccess...

Can an interface be implemented across an aggregate/composite class in vb.net?

VB.NET .NET 3.5 I have an aggregate class called Package as part of a shipping system. Package contains another class, BoxType . BoxType contains information about the box used to ship the package, such as length, width, etc. of the Box. Package has a method called GetShippingRates. This method calls a separate helper class, ShipRat...

ModalPopupExtender + ASP.NET AJAX: Can't page grid

I'm trying to page and sort my datagrid wich is inside a modalpopupextender but I can't page it in any way, already tried with , put the updatepanel inside, outside, in the middle (loL) and it does NOT work. modal popup does not get closed but the grid just dissapear. Code: Protected Sub Page_Load(ByVal sender As Object, ByVal e As Sy...

IP Address Lookup in VB.net (XP vs Windows 7)

Currently I use the following code to retrieve the IP address of the local workstation... strIPAddress = System.Net.Dns.GetHostEntry(strComputerName).AddressList(0).ToString() This is fine for the Windows XP workstations. However, in Vista and Windows 7, this returns the IPv6 address which is not used at all. Is there a method of sett...

Return top 5 records of a table in a dataset.

I want to return the top 5 records of a table in a dataset for datagrid view. The following does not work. DataGridView.DataSource = DS.Tables("TABLENAME").Select("SELECT TOP 5") Any suggestions? Using Visual Studio 2008 - VB.Net ...

How can I convert this linq.expression from C# to VB?

[QueryInterceptor("Somethings")] public Expression<Func<Something, bool>> OnSomethings() { // Code here } I had a view guesses, looked on msdn, but there are no examples matching the way that that is used. Ideas? ...

Windows Service Conundrum

All, I have a Custom object which I have written using VB.NET (.net 2.0). The object instantiates its own threading.timer object and carries out a number of background process including periodic interrogation of an oracle database and delivery of emails via smtp according to data detected in the database. The following is the code im...

What is the difference between events in VB and C#?

I am a VB programmer working my way into C#. I learned how to create and raise events in vb and am finding that it isnt done the same way in C#. Has anybody come across an article that will help me to understand how to do events in C# and maybe explain why it is different in VB. Thanks ...

Microsoft Chart control converts \n in file names to newline characters.

I am using a Microsoft Chart control (system.windows.forms.datavisualization.charting.chart) in a Windows forms application, vb.net 2008. I use folder paths for the x values in a pie chart. Chart control converts a name like c:\newfolder into c:[newline]ewfolder. I tried adding a slash, making it c:\\newfolder, but this only changes it t...