vb.net

Equivalent vb.net code

i am new to asp.net.Can you post an equivalent vb.net code following the C#.net code. Thanks public string getSecureCookie(HttpRequest Request) { HttpCookie secureCookie = Request.Cookies["Test"]; if(secureCookie!=null) { return secureCookie.ToString(); } else { return ""; } } ...

Load an assembly in parent folder - probing?

I'm developing a class library that uses a very simple plugin structure - to simple to start creating new appdomains for each plugin. This is the folder structure: Bin Modules Plugins.dll Main.dll Library.dll During runtime I load the types in Plugins.dll using Reflection. I would like to pass one of my own obje...

Transfer variable between asp pages by web request

can any one explain how to transfer a variable between asp pages by web request. Web request means post method and also suggest a best method in asp for transfering variable between the asp.net pages ...

Bind DropDownList into DataGrid Header

Hellow , I am Ma'moun , Please I Need Help in this Web Site I attach it in this Mail , I use(ASP.Net 3, SQLSERVREQPRESS) I develop a Web Site For a school , The Web Site has a page (Exams.aspx) wehen that page load the dataGrid will fill all student mark from table(dbo.Marks) The table (dbo.Marks) get its own Mark from (dbo.Exams) , ...

Where is the best place to suggest language enhancements to the MS Language teams?

Pretty much like the title says.. I'm wondering where the place is to suggest language enhancements. A place where the VB and C# language teams hang out? A central repository of ideas for the future of these languages? Something like that. ...

Would "Constrained Types" be useful in VB/C#?

Intro This question prompted by Marc Gravell's suggestion that I post new language feature suggestions to this site to gather general opinion on them. The idea is to gather if they might be helpful or maybe there is already another way to achieve what I am after. Suggestion (Constrained Types) A normal variable declaration in VB.Ne...

List of Links

I have two tables, one for Regions and one for those regions Areas, i want to automatically create a list of links that will be like: Region1 a.Area1 b.Area2 c.Area3 Region2 a.Area1 etcetc This link should be generated automatically when i load my page. The items in the list are not only text, when i click on Area1 i will call a...

What is taking IsNumeric() so long in .NET?

Was doing some benchmarking with IsNumeric today and compared it to the following function: Private Function IsNumeric(ByVal str As String) As Boolean If String.IsNullOrEmpty(Str) Then Return False Dim c As Char For i As Integer = 0 To Str.Length - 1 c = Str(i) If Not Char.IsNumber(c) Then Return False N...

callback function from unmanaged dll in VB .NET

I'm trying to use an unmanaged dll in VB.NET. The example source code provided with the dll is in VB6 and below is my attempt to convert it to .NET. When the dll tries to do a callback I get a "Attempted to read or write protected memory" exception. I really don't care about the callback function getting actually called. My code: <DllI...

Overriding ReadOnly Property in a subclass to make it Read/Write (VB.NET)

In C# I can have a base class with a property containing just a getter. Subclasses can then override the property and give it both a getter and a setter. This doesn't seem possible in VB.NET with properties since the property statement itself must describe whether it is ReadOnly or not. In my example below, it doesn't let me make the ...

Is there an easy way to randomize a list in VB.NET?

I have a list of type System.IO.FileInfo, and I would like to randomize the list. I thought I remember seeing something like list.randomize() a little while back but I cannot find where I may have seen that. My first foray into this yielded me with this function: Private Shared Sub GetRandom(ByVal oMax As Integer, ByRef currentVals As...

What is the VB.NET select case statement logic with case OR-ing

When writing some vb code I tripped and I'm still left wondering why. I was ORing the case expectation yet a value lieing within this range didn't warrant a match; why not? Example Code: Select Case 2 Case 0 ''// Some logic Case 1 ''// Some other logic Case 2 Or 3 Console....

.NET: Painting (clipping) only part of a control?

I have a VB.NET program where I'm using a WebBrowser control to simulate a timesheet form. For data entry, I'm using a DateTimePicker control that sits on top of the WebBrowser control, which I have programmed to move on top of the cell of the table in the WebBrowser control when the WebBrowser control is clicked on. (If you want to ask ...

Displaying a Downward Triangle in VB.NET ▼ (U+25BC)

Hey, I'm trying to figure out how to display the ▼ character properly in a .NET winform application. I am creating a custom control, and for the button, I want this character to appear. I am able to set the text to this character, but it appears as a blank square. Any ideas on what I need to do to make this character appear properl...

How do I display an XML document in a .Net web browser control?

I have an XML document and a CSS file that goes with it, which includes the page formatting style (both exported from Adobe Framemaker). I would like to import this data and display portions of the XML document in a web browser control with in Windows Forms or WPF. It's not clear to me how do make all of this work together. Any suggesti...

How to simplify several similar collection files in VB

Hi all, I'm new in programming. In VB2005, I have some object files, like a.vb, b.vb, c.vb.. each of them has different properties. Then I have the collection files, for example: as.vb is the collection of a, bs.vb is the collection of b... each has mostly the same content, like add, item, count... So now I would like to know, is th...

How can I load a panel at click-time with a ModalPopupExtender?

I am creating a checklist, where "checklistitems" are added to a "checklist". Each of the items has a button next to it to launch a modal popup that will contain additional information about the item. Because there are so many items, I've put the actual panel that will pop up on the "checklist", so it will only be on the web page once....

Setting Print Queue Priority in Windows

I have some code that sends a text file to a printer as follows: File.Copy(outputFile, "\\" & printServer & "\" & printer) Is there a way I can specify the priority of the print job before it's sent to the printer? ...

Raising Events From Interface (win forms)

Hi All, My scenario: Windows Forms Application with a base master (mdi) form. Public Interface IDoSomething that has an event: Event AddFilter() Modal popup window implements the interface and decalres event: Public Class frmPopup Implements IDoSomething Public Event AddFilter() Implements IDoSomething.AddFilter Popup also conta...

ASP.NET: Unfamiliar with Interfaces

I'm building a decent sized application in ASP.NET/VB.NET with various objects... I've never used interfaces before, and a fellow programmer balked when I mentioned this to him. Can anyone give me a quick overview on how they're used, what they're used for, and why I would use them? Maybe I don't need to use them for this project, but if...