I have been learning how to create dynamic images and dynamic stylesheets using ASP.NET 3.5. My reasoning behind this is I have a web page that I want to change the header background image (set with css) automatically. Check below for my test script:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits=...
Hi everyone,
I'm curious to know how I would go about setting up my service to stop cleanly on the server the service will be installed on. For example when I have many clients connecting and doing operations every minute and I want to shut-down the service for maintenance, how can I do this in the "OnStop" event of the service to then...
Is there a built in object that handles 3 linked values in a similar fashion to the hashtable? i.e. Key, Value1, Value2?
...
I just discovered, quite by accident, that this seems to work:
Public Interface Ix
ReadOnly Property TestProp()
End Interface
Public Interface Iy
Property TestProp()
End Interface
Public Sub TestSub
Dim x As Ix = Me.InstantiationNotImportant()
Dim y As Iy = CType(x, Iy)
End Sub
Maybe I've written a bit too much code ...
I was refactoring some code, and part of it included moving it from VB.Net to C#.
The old code declared a member like this:
Protected viewMode As New WebControl
The new code, I eventually got working, like this:
protected WebControl _viewMode = new WebControl(HtmlTextWriterTag.Span);
I can presume that the "New" keyword mean...
I have a method in my business logic layer that accepts a stream, which in the GUI comes from a user uploading a file, and I am interested in which is an appropriate way to test that the method appropriately uses this stream to make decisions.
public Sub Initialize(ByVal uploadStream As Stream)
''// Logic using uploadStream
End Sub
...
What library can you recommend to capture image from a webcam in .Net?
...
Is there any way to write a Visual Studio Project file easy or do i have to look at the xml format and write it by hand?
Is there any lib for this in .net framework(3.5)?
Im using vb.net but c# would also work..
...
I'm filling the background of some VB.NET 2005 WinForms form with a nice pretty gradient fill (by overriding the OnPaint event). This works fine but the various labels etc on the form show with a solid background even after I set the BackColor to Color.Transparent. Setting the transparency key of the form itself seems to affect this but ...
I have around 10 buttons on my form and I want them to call the same Click event handler.
But for that I need the Event handler to be generalized and we don't have "this" keyword in VB.NET to refer to the control that caused the event.
How do I implement the functionality of "this" keyword in VB.NET?
I want to be able to write an Even...
This may be a dumb question - but why are shared methods availible on types and instances in VB.net - am I wrong to assume they are the equivalent to C# static methods?
i.e
MyClass.MySharedMethod()
dim mc as new MyClass()
mc.MySharedMethod()
Why am I allowed to do this? What possible advantage is there to this - all I can see this ...
I have a function that dynamically adds text to an image in a predesignated spot. Originally I did it with jpegs, and it was working. I switched to PNG so the images would be better quality, as the original jpegs were kind of pixely. Anyway, here is my code. It executes down to the oBitmap.Save(), then dies with "A General Error Has O...
The answer I'm looking for could be simple, I'm pretty much a beginner in this. Problem is, I barely know the methods and parameters of the RadioButtonList class at all. So perhaps I should be using some other method? If so, please tell me.
Here's the situation: I have a stripped down default.aspx page. Aside from a element, almost ALL...
I have a web user control which my aspx page contains. During testing I discovered a exception being thrown. (The general rule that is in place, is that when an exception occurs the user is redirected to a excpetion page detailing the error)
Once the excpetion was handled in my User Control I wanted to throw it to the page where the pa...
Is there a way to measure the the amount of a string that will fit into a printed area without using the graphics object?
This is the only way i could find to do it:
Graphics instance = this.CreateGraphics();
instance.MeasureString(text, f, printArea1, StringFormat.GenericDefault,
out end, out lines);
I am using .net 2.0 and c#...
I'm trying to make a function that can take an enum type, display all the possible selections to the user, let them select one and then pass it back. Generics don't allow you to limit to enum. I've got code working that will cast back and forth, but I'd like it to accept and return the same enum type.
This code works but not as well as ...
I am re-designing part of our internal ORM tool, and I want to expose Field (a class that represents a field in the database, like CustomerFirstName) directly to the end-developer.
So that was easy enough to accomplish, however the API got a little ugly because this Field class was previously used internally and is too open. For instanc...
I have a series of usercontrols that are added and removed from a canvas in code behind. I need to insure that certain ones are forward of others. How do you set, what used to be the ZOrder in VB6, the order of a user control once it is added to a canvas?
...
I'm using VB.NET
I need same control (ListBox) to be displayed on 2 different tabs.
Is it mandatory to create 2 different ListBox instances?
...
I have two tables in a one to many relationship. (products and qty break pricing). At the database level I cannot create a relationship between the two tables. I brought those two tables into LINQ and created the association manually.
I need to do a big LINQ query and have the tables be joined. My problem is it's not using a join to ge...