I am trying to unit test a controller action that uses the membership provider to update user details. I am using Moq which so far has been easy to use.
The problem is I can't seem to get it to mock calls to methods that don't return anything.
<TestMethod()> _
Public Sub Can_Update_User()
' Arrange
_membershipService.Setup(Functio...
Using VB.NET in Visual Studio 2005, how do you disable or make read only a particular tabpage?
...
I've developed a Word template in VSTO. When published it consits of several files including a Setup.exe, several msi files etc.
Due to the fact that my company's security policy won't allow me to store dlls and exes on the server I need an alternative way to provide all the necessary stuff to the end user.
I thoght it would be enough...
Is there a way to specify what forms are Locked when opening a Modal Dialog?
I want to have a specific form available even if a Modal dialog is opened.
The form in question is a child form (Accessible from the Windows application bar), that is created from the main application form. The Modal Dialog should only lock the main applica...
We have a vendor that sends CSV files as email attachments. These CSV files contain statuses that are imported into our application. I'm trying to automate the process end-to-end, but it currently depends on someone opening an email, saving the attachment to a server share, so the application can use the file.
Since I cannot convince th...
Are there any commands that make life easy with respect to this? I want to take the column schema of one datatable (.net datatable) and copy it to another new datatable.
...
I have some friends who are 'old-school' VB6 database developers and I was telling them about .NET and its features, specifically ADO.NET.
In our conversation, they brought up the following reasons why they would rather stick with ADO than move to ADO.NET:
The Dataset is disconnected (What if power fails?)
The same amount of code stil...
I'm trying to set up Route mapping tests using MVC Contrib as described in Test ASP.NET MVC routes using MVC Contrib
The tests compile and execute, but they always fail with the message "The URL did not match any route."
I set up another test to try to get an idea of what the problem is:
Public Sub TestIndexRoute()
Dim ro...
I have that code running into a windows service and the service seem to have a memory leak, something is wrong for sure.
After looking at the whole code, I think it might be inside one of these function but I cannot seem to find where it could be.
Anyone could take a look and could let me know if something is wrong?
thanks for any kin...
I have two forms for my application, that are visible in the Windows taskbar. When a modal dialog is popped up on the main form, the secondary form is locked. However, when the user clicks on the secondary form on the taskbar, it appears over the modal dialog box, and is basically frozen.
Is there a way to ensure that the modal dialo...
Like in the title. I have no idea what to start with in order to implement a search engine like the one in Wrzuta.pl to a VB.NET 2008 application. I reckon this must be possible since I have seen an application doing this at http://www.wdownloader.yoyo.pl/download.php?cmd=click&id=1 - and a lot of mashups online, too.
If anyone by a...
If I have Visual Studio 2008 and I target a .NET 2.0 application, can I still use Lambda Expressions? My understanding of Lambda Expressios is that its a feature built into the compiler, not the framework, so my conclusion would be that I could use Lambda in .NET 2.0 application. Can someone please tell me if this is so?
...
I have a file name, like "Foo.dll," for a library that I know is in the bin directory. I want to create an Assembly object for it. I'm trying to instantiate this object from a class that's not a page, so I don't have the Request object to get the path. How do I get the path I need to use Assembly.Load()?
...
Is there a placement new in .NET (like C++)?
In other words if I allocate some memory in VB.NET
Dim Foo(64) as Byte
I want to instance BarClass in the Foo memory (something like...)
Dim Bar as New BarClass(Foo)
However, I don't see any syntax to do this.
Instead I have to do something like:
Dim Foo(1) as BarClass
Foo(0) = new...
That is the question. Is there anything you can do with c++ unions that you can't with c# Explicit structs?
...
I am getting an intermittent "System.Web.HttpException: Request timed out." error when my code hits the line response.write():
sMessage = "Searching...0% complete."<br>
sSetVal = "<script>document.getElementById('MessageDiv').innerHTML='" & sMessage & "';</script>"<br>
Response.write(sSetVal)
Note that Response.BufferOutput = fa...
I am trying to build a resource file for a website basically jamming all the images into a compressed file that is then unpacked on the output buffers to the client.
my question is in vb2005 can a filestream be multi threaded if you know the size of the converted file, ala like a bit torrent and work on pieces of the filestream ( the in...
I have an App where I'd like to be able to edit any type (font, colour, point etc.) at run time and use any of the .Net default type editors. (e.g., font/ colour picker).
Rather than re-invent the wheel, I decided to use the property grid control.
If I pass an object of, say font, to the grid, it lists all the fields separately, with n...
Hi, I'm trying to write some generic code in VB.NET that determines whether or not a SQL server database table contains an identity column and, if so, to return the name of that column.
I'm working in Visual Basic 2008 Express and have created a SQL database, "MyDatabase" with 1 table called "MyTable". Within that table, I've got 3 col...
Hello. I made a control that inherits directly from ErrorProvider. I thought that applying it the ToolboxBitmap attribute would be enough to get my control to have the same icon on the toolbox as the original control has, but it doesn't. It's strange, as if I add the control to the form, it will appear just as it should, but it doesn't c...