vb.net

How can I implement a formula factory?

First the requirements: By management requirements, I can't use open source code. I need the users to define their own formulas for a project. My users don't know how to code. The formulas need to be saved somehow, and being read later. I need to debug the formulas written, so I need to be able to see and understand them. The formulas ...

System.Runtime.InteropServices.COMException (0x80070102): Operation failed.

Hi, When I am faxing a PDF file using FAXCOMLIB in VB.Net code, I am getting the following error. System.Runtime.InteropServices.COMException (0x80070102): Operation failed. at FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer). What could be the problem? Thanks, P.Gopalakrishnan. ...

Application crashes when calling embedded resources

I'm writing a console application in Visual Basic 2008 Express. I added several text files to my project as resources. Specifically... I went to my project's "Properties" page and selected the "Resources" tab. I clicked the "Add Resource" dropdown and chose "Add New Text File". I entered some simple text and saved the file as "W...

Tab Control in VB.Net

Hi all, I'm doing my project and I design including many tab control in vb.net. Example: I have 3 tab pages like tab1,tab2,tab3. And I have menu bar to open tab1,tab2,tab3. My Question is: How can you use code to open each tab page? Can anyone help me to solve this problem? Thanks, Sopolin ...

Why does Integer.TryParse set result to zero on failure?

My understanding of the Integer.TryParse() function was that it tried to parse an integer from the passed in string and if the parse failed the result integer would remain as it did before. I have an integer with a default value of -1 which I would like to remain at -1 if the parse fails. However the Integer.TryParse() function on faili...

To change the text of LinkButton in EditItemTemplate

Hi, I have a table from which i am getting my data to the GridView control. I need to Insert Or Update this row to another table, according to some condition. If one condition is true, i need to change the text of the LinkButton in EditItemTemplate to insert, else to update itself. How can i change the text of LinkButton in RowCommand? ...

How do you stop a page_load event from running if the page is refreshed

Each time my webpage is loaded it runs a routine in the page_load event of the page behind which increments a viewcount by 1. The problem I have is that the routine runs even if use refresh to reload the page. How do I stop this routine from running if the page has been viewed by a particular user in their current session? I thought I...

VB.Net 3.5 Check if file is in use

I have an update program that is completely independent of my main application. I run the update.exe to update the app.exe. To check to see if the file is in use, I move it to another file and catch an error if it is in use. If no problems occurr I rename it back. At least that was my plan... Main program: app.exe Update program: ...

Why would one keep several different "displays" in a single page, rather than separate different views in their own page?

When and why would it be a good choice to keep the view of two different sets of information on the same page, and just change what's visible depending on different parameters? For example, an application I'm working on has three levels of users: Admin, Director and Project Manager. We have a Managers.aspx page which follows this flow ...

how to get a column of recordset in an arraylist ?

how to get a column of recordset in an arraylist ?? using vb.net .. please help me out .. ...

Why Doesn't My SQL Query do anything?

Hi there I got this query string I have to run so I can update a distinct row in a sql server table: servidorSql.ConnectionString = conexao Dim insert As String = "UPDATE [Equipamentos] SET [ID_Cliente]=@ID_Cliente, [Identificacao] = @Identificacao, [Fabricante] = @Fabricante, [Modelo] = @Modelo, [Versao_Software] = @Versao...

Determing longest repeating cycle in a decimal expansion

Today I encountered this article about decimal expansion and I was instantaneously inspired to rework my solution on Project Euler Problem 26 to include this new knowledge of math for a more effecient solution (no brute forcing). In short the problem is to find the value of d ranging 1-1000 that would maximize the length of the repeating...

Disadvantages of using properties only with no corresponding fields in .NET?

I have classes which have automatic properties only like public customerName {get; set;}. They are public because they are accessed outside the class. They can also be accessed inside the class. They offer good encapsulation and better debugging. I can put a breakpoint on one if I need to know who is accessing it and when. My question i...

Vb.net Model View Control

Does anyone have a good website for the basics of using Model View Control pattern with either vb.net or C#. Thanks ...

Adding controls dynamically at design time vb.net

I have been developing some custom smart tags. I am using a DesignerActionMethodItem which gets me to a fired method in code. When I try to hit the controls.Add the control is added but it seems the designer is unaware of it. It is never serialized and it goes away when the form is refreshed in the designer. Any help would be greatly...

Microsoft Access 2007 Connection

I wrote a program that connected to a Microsoft Access 2000/2003 mdb file and accesses the data. It works fine, but I'm wondering if there is a way to connect to Access 2007? If I change my connection string, will my program work with access 2007 or is it more complicated then that? And if it will work, can someone provide an example of ...

Why is IntelliSense support for C# lacking when compared to VB.NET?

For me, developing for the Java ecosystem payed the bills for many years. However, for several years now, I have been working primarily in the .Net space. Initially, my transition into the .Net world consisted of writing and maintaining VB.Net code. VS provided almost all of the nice intellisense support I came to expect after years o...

String substring function

How can i get the string within a parenthesis with a custom function? e.x. the string "GREECE (+30)" should return "+30" only ...

SQL Query Conversion to LINQ Left Outer Join (VB.NET)

I've looked all around and spent way to long trying to convert this SQL statement into a Linq statement in VB. I'm sure it would be a good example for others out there - the statement is trying to pull products that have a many-to-many relationship with product categories, and the categories have a hierarchy of parents/children. Here is...

Control ID rendering differently between environments

I have a web application that works in our stage/test environment fine but once we moved it to our production environment something weird happens. All the control ids change. For example a label went from ctl00_cphMainContent_lblPetName to _ctl0_cphMainContent_lblPetName. Why would this happen? What could cause something like this to h...