vb.net

ASP.Net: Using System.Web.UI.Control.ResolveUrl() in a shared/static function

What is the best way to use ResolveUrl() in a Shared/static function in Asp.Net? My current solution for VB.Net is: Dim x As New System.Web.UI.Control x.ResolveUrl("~/someUrl") Or C#: System.Web.UI.Control x = new System.Web.UI.Control(); x.ResolveUrl("~/someUrl"); But I realize that isn't the best way of calling it. ...

How do I save a datagrid to excel in vb.net?

I know that this should be easy but how do I export/save a DataGridView to excel? ...

Do you have any recommended File templates for resharper for VB.Net

The ones that stick out and make life usefull. ...

Starting out with Exchange Server development

We've written several Outlook Add-ins for various projects and have now been asked to look at writing a Exchange server add-in. We will need to inspect all incoming / outgoing msgs and tag / file them into a document management system. If it's a message that we are interested in we would ideally like to change the default icon that is ...

Cannot access a disposed object - How to fix?

In a VB.NET WinForms project I get an exception "Cannot access a disposed object" when closing a form. It occurs very rarely and I cannot recreate it on demand. The stack trace looks like this: Cannot access a disposed object. Object name: 'dbiSchedule'. at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_...

How to store Application Messages for a .NET Website

Hello, I am looking for a method of storing Application Messages, such as "You have logged in successfully" "An error has occurred, please call the helpdesk on x100" "You do not have the authority to reset all system passwords" etc So that "when" the users decide they don't like the wording of messages I don't have to change the sou...

Compile a referenced dll

Using VS2005 and vb.net ... I have a project that is an api for a datastore that I created. When compiled creates api.dll. I have a second project in the same solution that has a project reference to the api project which when compiled will create wrapper.dll. This is basically a wrapper for the api that is specific to an application. Wh...

"File Save Failed" error when working with Crystal Reports in VS2008

Occasionally while attempting to save a Crystal Report that I'm working on in VS2008, a dialog titled "File Save Failed" pops up saying "The document could not be saved in C:\Users\Phillip\AppData\Local\Temp{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.rpt. It has been saved in C:\Users\Phillip\AppData\Local\Temp\~zzz{YYYYYYYY-YYYY-YYYY-YYYY-Y...

Beginning ASP.NET MVC with VB.net 2008

Where can I find a good tutorial on learning ASP.NET MVC using VB.net 2008 as the language? Most in-depth tutorials that I found in searching the web were written in C#. ...

.NET : Double-click event in TabControl

I would like to intercept the event in a .NET Windows Forms TabControl when the user has changed tab by double-clicking the tab (instead of just single-clicking it). Do you have any idea of how I can do that? ...

How to pass method name to custom server control in asp.net?

I am working on a Customer Server Control that extends another control. There is no problem with attaching to other controls on the form. in vb.net: Parent.FindControl(TargetControlName) I would like to pass a method to the control in the ASPX markup. for example: <c:MyCustomerControl runat=server InitializeStuffCallback="Initializ...

Converter for VB.NET Code to Linux Platform Exist?

I am interested in moving a number of my projects from Visual Studio and Access/Office Basic with a SQL back-end to the Linux world. Are there any utilities available to move code over to a similar platform on Linux? I apologize in advance for my naiveté, it's been at least 18 years since I last worked in a Unix environment... Thanks ...

.Net - Detecting the Appearance Setting (Classic or XP?)

Hey stack, I have some UI in VB 2005 that looks great in XP Style, but goes hideous in Classic Style. Any ideas about how to detect which mode the user is in and re-format the forms on the fly? Thanks in Advance! -Chris Post Answer Edit: Thanks Daniel, looks like this will work. I'm using the first solution you posted with the Get...

Strip HTML from string in SSRS 2005 (VB.NET)

my SSRS DataSet returns a field with HTML, e.g. <b>blah blah </b><i> blah </i>. how do i strip all the HTML tags? has to be done with inline VB.NET Changing the data in the table is not an option. thank you Solution found ... = System.Text.RegularExpressions.Regex.Replace(StringWithHTMLtoStrip, "<[^>]+>","") ...

Is there a built in way in .Net AJAX to manually serialize an object to a JSON string?

I've found ScriptingJsonSerializationSection but I'm not sure how to use it. I could write a function to convert the object to a JSON string manually, but since .Net can do it on the fly with the <System.Web.Services.WebMethod()> and <System.Web.Script.Services.ScriptMethod()> attributes so there must be a built-in way that I'm missing. ...

VB.NET form Height Question

I have a VB6.0 project and I want to convert it in VB.Net. In my VB6.0 application some of the MDI Child form’s height is 17000 and width is 13000. Now I want to set the same form size in VB.Net forms, but it allows maximum form width = 1036, height = 780 for resolution 1024x768. How can I increase form size with same resolution? Also...

In .NET, how do I launch a file with command line arguments (without knowing the location of the exe)?

Here's the situation: I am trying to launch an application, but the location of the .exe isn't known to me. Now, if the file extension is registered (in Windows), I can do something like: Process.Start("Sample.xls"); However, I need to pass some command line arguments as well. I couldn't get this to work Process p = new Process(...

How to assign a method's output to a textbox value without code behind

How do I assign a method's output to a textbox value without code behind? <%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <script runat="server"> Public TextFromString As String = "test text test text" Public TextFromMethod As ...

VB.NET Get underlying system.type from nullable type

I'm attempting to create a dataset based on the properties of an object. For example, I have an instance of a Person class with properties including ID, Forename, Surname, DOB etc. Using reflection, I'm adding columns to a new dataset based on the object properties: For Each pi As PropertyInfo In person.GetType().GetProperties() Dim...

Is there an easy way to do transparent forms in a VB .NET app?

I'm writing a simple app that's going to have a tiny form sitting in one corner of the screen, updating itself. I'd really love for that form to be transparent and to have the transparency be user-configurable. Is there any easy way to achieve this? ...