vb.net

paint an image file and save it in a database

hello I've an application that I need to edit the image on paint the image in the picturebox then save it in the database. what is supposed to be done? ...

Decrypt Java AES 128Bit encrypted string which has been encrypted using key only (no IV) in VB.NET

I am attempting to find some code to use in VB.NET to decrypt a string that has been encrypted using the Java crypto libary. All of the code I have found so far uses an Initialisation Vector and Key to decrypt but the string has been encrypted using the Key only. (Using an Initialisation Vector is apperently an optional step in Java)....

Response.Redirect() rewrites hostname in IE(8)?

I'm trying to use Response.Redirect(1019characterLongUrl) to redirect the user to another domain. The URL I use is +1k characters long. This works perfectly in Chrome and Firefox. But as soon as I use Internet Explorer the hostname of the url is exchanged. If the URL I use looks something like: https://a01-bc-def.com/myDirA/myDirB?myQu...

Search a MembershipUserCollection

Hi all, I am currently looking for a way to search though a MembershipUserCollection. At the moment the user will pick the role they wish to see. this could return 100's if not 1000's of records which are paged in a repeater. on the same screen the user can type in part of the user name they wish to find and it should filter the data...

How can I further optimise this regular expression?

I have just coded the below regular expression. I have a mini rich text editor on a web page (very similar to the one I am using to post this question) and I want to make use of a double asterisk to indicate which words/phrases should be wrapped in a strong tag. The aim is to allow the user to add pre-defined HTML elements without actual...

Add multiple solutions referencing the same projects to SourceSafe?

Hi, I've replaced someone at this company, and he was their SourceSafe guy. He kind of sucked at it, but he knew more than anyone else (i.e. anything at all) and so I'm kind of stuck for places to ask this question. Sorry. Anyway, I've got a StartUp project (StartupProjectA) in Visual Studio that references projects A, B and C. I've go...

Is it possible to conditionally hide properties at compile time in .Net?

Depending on a preprocessor directive, I want to set all properties in a class to EditorBrowsableAttribute.Never. I thought about creating a custom attribute, derived from EditorBrowsableAttribute, but unfortunately that class is sealed. I've had a look at ICustomTypeDescriptor, but in the GetProperties method, I can get hold of ea...

annoying indenting in Visual Studio when editing .aspx files

When I am editing VB code inside a .aspx file in Visual Studio 2010, my code is automatically indented in a bizarre way. I have searched through the options and can't find anything that fixes this. [I thought unchecking Pretty listing (reformatting) of code in Text Editor -> Basic -> VB Specific would for sure do the trick but it didn'...

UPnPLib.dll - UPnPDevices.Count returning 0 (not right - please help)

This library comes with windows, in the windows\system32 directory, if you register it and type the following code (C#/VB.Net/VB6/Delphi either is fine): Dim devices As UPNPLib.UPnPDevices = New UPNPLib.UPnPDevices MsgBox(devices.Count) I keep getting 0, but i know this cannot be true because if i do a FindByUDN (in the UPnPDeviceFind...

Determine OS type for Wow6432Node Registry

I need to check a value within the registry. The application (Cisco VPN) is a 32bit app so uses Wow6432Node when installed on 64bit operating systems. What would be the best method of selecting which string to use? Checking the OS for x64, attempting to read one and then the other if the first fails? Or is there a better method? Dim ke...

Adding An Overloaded Constructor To A WinForm

I have created a dialog as a winform and am calling that winform like this: Dim dlgEditChangeOrder As New dgEditChangeOrder Dim dlgResult As DialogResult dlgResult = dlgEditChangeOrder.ShowDialog ...pretty simple. I want to be able to set the visiblility of a control on the win form when the win form is called. I wou...

How close Html window when click asp.net button?

I have asp.net button "OK" in html popup window. I after my logic done how close that popup window it self? <asp:Button Id="btnOK" runat="server" AccessKey="<%$Resources: wss,multipages_okbutton_accesskey%>" Width="70px" Text="<%$Resources:wss, multipages_okbutton_text%>" OnClick="btnOK_Click" /> ...

C# to Vb.Net Syntax conversion for class instantiation with properties

Ello, Working with Workflow Foundations 4 (in C#) and trying to write a VB expression Is there a way to do the following in VB.Net on one line? SomeObj instance = new SomeObj() { SomeStringProp = "a", SomeIntProp = 17 }; ...

Total Nos. of items in array variable

Hi, I have an array variable (string type). It contains certain no. of items, that I donot know how many they are. I need to run a loop for that many nos. that the array contains. I tried LBound and UBound loop but it says my array is not a system array. How can I know how many items my array contains? Thanks Furqan ...

Add bottom side-to-side scroll bar to ExtJS Grid

Here are my two grids -- they are ExtJs grids however we wrap the declarations in vb.net code: Dim VehicleOptionsGrid As New Framework.WebControls.Grids.Grid With VehicleOptionsGrid .ID = "VehicleOptionsGrid" .Title = "Vehicle Options" .Toolbar.UseDefaultButtons = False .Mode = Grids.Grid.Grid...

VB - simply link a Data Grid View to display data that was selected from a ComboBox

Hello, I just want to display data in a DataGridView (from SQL - already made the connection) based on what is selected in a ComboBox (data that is also coming from SQL). The 2 are separete on the form. I am using VB 2010. This doesn't work for me: objCommand2.CommandText = "SELECT ProductID, Name, Color, Size, ListPrice FROM SalesLT.P...

Parsing Excel reference with regular expression?

Excel returns a reference of the form =Sheet1!R14C1R22C71junk ("junk" won't normally be there, but I want to be sure that there's no extraneous text.) I would like to 'split' this into a VB array, where a(0)="Sheet1" a(1)="14" a(2)="1" a(3)="22" a(4)="71" a(5)="junk" I'm sure it can be done easily with a regular expression, but I...

Calling SharePoint Web Service over SSL in VB.Net (401 Unauthorized)

I'm trying to call the AddAttachment of the Lists.asmx SharePoint web service the below code works fine if I'm calling the web service over HTTP. Dim img(MyFile.PostedFile.ContentLength - 1) As Byte MyFile.PostedFile.InputStream.Read(img, 0, img.Length) 'Dim fStream As FileStream = File.OpenRead(FullFileName) ...

VB.NET generic function to return a control

Hi All, I have created a couple of simple functions in VB.NET that simply return a control of a certain type that I already know, such as HtmlInputHidden, Label, etc. That means that each of the functions is created only for that special purpose. What I'd like to do is combine all those functions into one function using generics. The...

Mass Search and Replace with Wildcards or Reg Expression MyString.Length to Len(MyString)

I have a large ASP.NET project where I want to do a mass search and replace (about 3500 instances) I want to change If strErrorMessage.Length > 0 If strSomeString.Length > 0 If strWhatever.Length > 0 and any other similar call to the Length method from a string to the following If Len(strErrorMessage) > 0 If Len(strSomeString) > ...