vb.net

How do I call a jq function from vb.net code behind ?

I need to call this from the code behind if there is a certain value read in from a query string variable ie x as string = request.querysting("Var") if x = 'Hide" then function guestHide() { $(".panel").hide("slow"); } end if ...

VB.net ISo DateFormat

I have a date in VB.net that is stored in ISO 8601 format 'Date here is local time in germany Dim s As String = "2010-09-27T16:54:28+02:00" Dim dt As DateTime If Date.TryParse(s, dt) = True Then End If When I use try to parse it shows me date in my local timezone, how can I get date as 2010-9-27 4:54 PM as well as GMT DATE ?...

Converting c++ printf formatting to/from VB .NET string formatting

I have some VB .NET software that interfaces to a load of old (but sound) COM objects. The VB provides a GUI for the COM objects, part of which consists of setting various options on the COM objects - several of which relate to string formatting. I have a simple pair of VB .NET functions that convert basic %f, %d, %g formats to/from .NE...

VB.NET Using a custom timer in a lambda expression in its own "New" statement - is it okay?

This works, and I can't imagine how it might cause problems, but visual studio gives me an warning and that makes me sad. I'm just wondering if doing something like this might ever cause problems: I have a custom timer that acts like a Wait for some number of milliseconds and then execute a function. It looks like this: Public Class ...

Possible bug with Graphics.DrawString and TextRenderingHint in .Net Winforms

Here's the OnPaint method of a control that simply inherits from control and provides a property to get/set the textrenderinghint: Private _mode as TextRenderingHint = SystemDefault. Public Property Mode as TextRenderingHint Get & Set _mode ... Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) ...

Is C# faster than VB.NET?

You'd think both are the same. But maybe it's the compiler that Microsoft has used, but I've noticed that when compiling two very small programs, identical logic. VB.NET uses more IL instructions. Is it true than that c# must be faster, if only because its compiler is smarter. ...

How do you put a carriage return into the field of an SQL statement using VB?

I want to insert a record using SQL and one of the fields needs to contain a carriage return, e.g. Notes field: Line 1 Line 2 End line How would I code this SQL statement using VB ...

mvc.net multiple forms childaction

I have 2 forms on a page, they are included in the masterpage like so: Html.RenderAction("Form1", "Controller") and Html.RenderAction("Form2", "Controller") The Controller has the following: <ChildActionOnly()> Function Form1() As ActionResult Return View("Form1", New ModelObject()) End Function <ChildActionOnly()> <AcceptV...

removing xmlns from xml file

Hi I am Appending new Elements into XML file which is creating additional xmlns attribute and cannot be removed. i tried most of the common options here's my code This Add's new Entrys to the XML file Private Sub AddNewElement(ByRef FileInfo As System.IO.FileInfo) Dim bln As Boolean = False Dim XmlDoc As System.Xml...

Linq to Entity Framework (v1)

Hi - I'm currently working on a solution, where there are the concepts of users, work queues and work items. At a basic level a user has a series of work queues assigned to them, the work queue containing the work that is to be done. So - at the moment we have a basic Linq query that returns all of the queues, but I was hoping to res...

Sample Code for Asynch Sockets Server and Client in VB.net

HI there, could someone point me in the direction of a good case study with source code of asynchronous socket programming in VB.NET preferably VS2005 .net 3.5 vintage. ...

How to get Router Name & IP as shown in Windows Network Tab? (in Code)

Basically, if you go to Start and click Computer and then click on the Network link on the left hand side, you'll notice on the right hand side several categories, one of which is titled "Network Infrustructure", in that category, my router is listed, and in my case, it is "LINKSYS WAG160N Wireless-N ADSL2+ Gateway" and when you right-cl...

Multiple Line continuation in VB.NET IDE (Visual Studio 2010)

i notice that when i start next line of code and i press enter, it recompacts itself and the continued line moves left a bit... then if i place focus on the second line and press enter again, it (the second line) moves to the left some more, and it keeps doing this every time i focus on second line and press enter. this is as you can ima...

Output Debug and Trace Messages to Form

My problem is similar to one posed by Joel Coehoorn some time ago when he wanted to Redirect Trace Output to Console. In my case, I'd like to output to a ListView or TextBox or for that matter, any control which can accept text. For this purpose, I'd like to have a general purpose Trace/Debug listener which I can hook to in order to pro...

After successfully publishing the code, published folder is empty

Hi, I'm using visual studio 2008 for developing website application. Website application is building properly & after publishing the same it shows as published successfully. When i checked the published folder, no files, dlls were present over there. please guide where i'm missing. Laxman ...

Detailsview Keeping items after inserting, not able to increment?

I have a checkbox that allows users to keep the input in a detailsview to help if they are inputting many similair items. I'd like one field to increment, but it won't take. I've even tried putting it in a hidden field. Incrementing field: Protected Sub DetailsView3_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebContr...

How do i use System.Net.NetworkInformation.GatewayIPAddressInformation Class?

I tried every trick in the book, creating a new object, instantiating it (even tho it says i can't) and just trying to create a reference to use it, and then also trying to call the .Address value inside it while using it like i would use a shared member (without instantiation) and nothing is working, msdn sample/help is useless... i eve...

Manipulating a tab control

I have a form with a bunch of tabs on it, but I don't want them to all be visible all the time. I've tried For Each t In TabControl1.TabPages t.Hide() Next TabControl1.TabPages("DateRange").Show() in order to hide them all on doc load and then .Show() for just the tabs that I want at that time, but that apparentl...

Conversion of Inteface from vb.net to c#

I have a control that overrides the protected GetService method and assigns it to the IServiceProvider interface: Class MyControl Inherits Control Implements IServiceProvider Protected Overrides Sub GetService(t as Type) as Object Implements IServiceProvider.GetService End Sub End Class I'm struggling to convert this...

Create pop up 'toaster' effect message

Hi, I'm trying to replicate the Gmail Notifier popup. It both fades in (Opacity) and raises from the start bar. I've managed to do the fade in\out using a timer and opacity but how do I: A) make the form appear to 'pop up'? (I think its height grows via a timer from 0 to it's max? B) Locate it's start point exactly above the task bar...