I have a text in this format:
term: 156:59 datainput
I want to remove the ":" between the number and then replace it with something else so the text can become:
term: 156-59 datainput
How can I do this in VB.NET?
...
This is a bit of unusual problem that I'm experiencing, but recently one of the users of a production application started reporting errors in the system. These were traced to a 503 Service Unavailable error when making a call to a web service used by the application.
Now here's the odd part, only the one user is affected by this issue....
I am creating reports using the Microsoft ReportViewer control. I am encountering some formatting issues when exporting the reports into Excel.
The problem is that I am specifying a line width of 1pt in ReportViewer, which is the smallest line possible (or is it?). When the export is done, the line widths in Excel are all thick bor...
I really like the moq mocking framework. I've used it on several projects. Unfortunately, one of my customers is demanding we use VB.Net. Not my preference, but hey, .Net is .Net, right?
I've heard that moq has some trouble with VB. Is this true? Is so, what sorts of trouble? I would expect it to work fine given the language agnos...
Hi,
In VB6, there used to be a Collection data type that would allow retrieval of an item in the collection by either its key or its ordinal. However, it wasn't strongly typed.
Now, with VB.Net, I am looking for a suitable replacement that is strongly type and could be used with a generic collection.
This is a simple example of what...
I have a Base Class, called primitive Graphics. derived from this class are several different types of graphics, squares, rectangles, lines, etc.
I am storing those graphics in an object that inherits collectionbase. This causes a problem because I cannot access any of the members in the derived class when they are added to the collecti...
Hi,
I am fairly new to reflection and I would like to know, if possible, how to create an instance of a class then add properties to the class, set those properties, then read them later. I don't have any code as i don't even know how to start going about this. C# or VB is fine.
Thank You
EDIT: (to elaborate)
My system has a dynamic ...
I am getting an "ArgumentOutOfRangeException" on parameter index whenever I try to instantiate a session factory in nHibernate. The error comes from a procedure deep in the bowels of nHibernate. I can post the stack-trace of the error if that would help.
This is on a fresh project with a pretty simple three tier architecture. The data l...
I'm trying to dynamically add results to this display and I simply want to put a break tag after a label to start putting information on the next line. For some reason, Using a literal isn't working for me. Is there a better way to do this or should I just use tables?
Dim break As LiteralControl
break = New LiteralControl("<br />")
di...
I am having a problem that gfrizzle said he had had but then said here that he fixed it. I looked at the post and implemented what it said to do, but it still doesn’t work for me (if gfrizzle sees this, I would like to see his code)
To restate the problem, I want to create business rules that are seperated from the DAL code that is gen...
What are the situations and their associated benefits of using Generics over Inheritance and vice-versa, and how should they be best combined?
Thanks for the answer guys.
I'm going to try to state the motivation for this question as best I can:
I have a class as shown below:
class InformationReturn<T> where T : Info
{
InformationR...
I need to start utilizing the interop in my programs to automate several functions in Word and Outlook and I was checking if anyone knew a good place to start. My ultimate goal is for my program to kick off a mail merge, create several different files and save them accordingly, then e-mail the different files to different people based u...
Does any one know how can I cut the 1st 3 char in a string in vb 2008?
For example:
Dim i As String = "ABCDEF";
I want to only cut the 1st 3 char and the system will only display "ABC" after the 'cut' action done.
...
I am currently working on a VB.NET project and the hardest thing that I am having trouble with is that everything is black and blue.
Having worked a lot with C#, I really like the way that types are colored differently.
I have tried going in and having a look at the "Tools > Options > Fonts and Colors" and the various "User Types" un...
Hi,
I have text like this format
"term: 156^^^:^^59 datainput" Or "term: 156^^^:59 datainput" or "term: 156:^^^59"
The "^" represented white space.
Notice the white space between the the two numbers and the colon. There 2, 3, 4 or even 7 white space between the two number. I want to remove these white space so that the text can b...
hi guys,
I have a textbox in which i have to write content inside stringbuilder.
Following is my stringbuilder.
Dim strString As New StringBuilder()
strString.AppendLine("<table>")
strString.AppendLine("<tr><td>")
strString.AppendLine("<br/><br/>")
strString.AppendLine("<div style=""text-transform:...
What is the VB.net syntax below for?
var list = xd.Descendants("product")
.Select(element =>new
{
Title = element.Attribute("title").Value,
Duration = element.Element("duration").Value
}).ToList();
...
I have a query string called propID and I wanna check if the passed value in it is a legal integer or not to avoid throwing an error that might reveal info about my database, how can I do it?
In other words, I want something like -but in vb.net- :
IF QueryString("propID").Content.Type = "int32" Then Proceed
...
I'm working on a Windows Service that watches a few folders for changes, creations, and deletions. It all works well with the exception of one watcher that watches a single file (XML File with Configuration Settings) for minor changes.
I tried taking the Windows Service code and putting it into a simple windows application with start/s...
I've been working on a Stored Procedure that checks the time, then retrieves records going back over the last full 24 hour period between 8am and the previous 8am. So, for instance, assume that it's currently 10am. The stored procedure looks at the current time, notes that it is past 8am, and sets the query to run backwards 24 hours, f...