vb.net

How to change all highlighted rows in DataGridView - VB.NEt

Hi all, Begginer's question. I'm trying to write small piece of code in Visual Studio (VB.net) that will change value of a particular field of the database for all highlightetd rows. So, I'm running my form, which displays some data from the datatabse. I then highlight some rows (holding Ctrl and clicking). Next I click a button that wi...

How can I force VB.net, that a ENTER creates a new line, rather than close the Dialog Box ?

Hi, I've built a dialogbox with a RichTextBox and I'd like to have the following behaviour: I've got the focus (cursor) in the RichTextBox. When the ENTER key is pressed, then there should be a new line in the rich edit control created. The ENTER should NOT close the dialog box [as it does now :-( ]. Any Idea ? ...

How to handle Null in LINQ Subquery?

I've got a subquery that returns the most recent value from a child table. In some cases the subquery returns nothing. The query below fails at runtime because the inferred type of MemberPrice is decimal and is not nullable. Simplified query: Dim q = From s In dc.STOCKs _ Select s.ID, MemberPrice = _ (From mp In dc...

In VB.NET/C#, how do I copy a SQL table schema from on DB to another?

I want to move a table schema from one database to another using vb.net or c#. How can I do that? Thanks in advance ...

calling a VB.net function from javascript

Hello all, I need to find a way to call a vb.net function in my aspx page from javascript. I have a Jquery function that makes the .drop class .droppable, and whenever I drop a .draggable onto a drop target, my Jquery code successfully fires a java alert statement. All in pure javascript. What I need to do is some heavy math! I do unde...

Dynamically loading .NET assemblies

Guys, I am writing a program and I want the program to support plugins. I created an interface that the program must implement. I am using the following code from my main program to call the plugin: Dim asm As Assembly = Assembly.LoadFrom(ff.FullName) ' Get the type Dim myType As System.Type = asm.GetType(asm.GetName.Name + "." + asm.G...

Marshaling arrays from VB.NET to COM object

Hi, I have a VB6 program which calls a COM method, passing 2 arrays as parameters and expecting 2 arrays to be populated in response. The code is this, where ItemIDs and ItemClientHandles are the input array parameters and MyItemServerHandles and Errors are populated by the COM object. Dim ItemIDs(2) As String Dim ItemClientHandles(2)...

how to Zip files in vb.net 2005

hai how to zip files(Any files or folder ) in vb.net 2005.please give some ideas thank you by somu ...

could you convert this line of c# into vb.net?

I tried many things but I always get "cannot convert string to membershipuser" from the ASP.Net MVC Membership Starter Kit this line from file ListUsers.aspx var users = (ViewData["Users"] as List<MembershipUser>); ViewData["Users"] come from public virtual ViewResult Index( int? pageIndex, int? pageSize ) { ViewData["Title"] =...

How can I reload a gridview onclientclick of another gridview's button?

I have a modal popup that contains a gridview. On the click of a button inside of a grid i reload the gridview with the data that depends on the id of the row clicked in the gridview. I would have like to reload the gridview onclientclick but I couldn't find a way to do that. Is it possible to reload a gridview client-side without the us...

Detect F5 being pressed and Refresh

I have a webform and i want to detect if F5 button was pressed or if the page was refreshed. I know about postback but it is not what i'm looking for. I have a gridview that loads in a modal popup when a button is clicked and a parameter's value is set for the gridview. When refresh is hit and if the modal popup button was previously cli...

How can I navigate to different webpages in the same MSIE window in VB.NET

I have code that opens a new window but I want to be able to edit the same one. System.Diagnostics.Process.Start("iexplore.exe", "http://www.live.com") ...

.Net dependency injection on debug build using nant

Hi All, I have a relatively small app that Im building using vb.net 2.0, and nant. Its a app that calls out to an external exe to produce some output files, then processes those output files afterwards. I have built an interface to the exe, which I have created a stub implementation and the real implementation, what I would like to be ...

Couldn't load File or Assembly

I have a web application in .Net in which I use Ajax controls in some pages. Those pages are working in localhost, but when hosted, the pages in which Ajax included shows following error. Server Error in '/Allforkids' Application. Security Exception Description: The application attempted to perform an operation not allowed by the secu...

Why is VB so popular?

To me, Visual Basic seems clumsy, ugly, error-prone, and difficult to read. I'll let others explain why. While VB.net has clearly been a huge leap forward for the language in terms of features, I still don't understand why anyone would choose to code in VB over, say, C#. However, I still see (what seems to be) the vast majority of comm...

How do i access another user's registry portion in win XP

How do i access another user's registry portion in win XP? how do i access another user's HKey_current_user on my machine, in vb2005 or if someone can recommend a software that can already do it. Im trying to make a quick registry repair tool to fix a damaged or corrupted user ...

How to pass in the directory that you have been run from to an executable in VB

This may be simple but I have brain freeze on just now If I cd into a directory from a command line and then run my executable VB.net application, is there a way to detect the directory that it was launched from. I currently have the executable in my PATH however ideally the person would cd into the directory that they were wanting th...

Why does the read of StandardOut fail here?

I am currently trying to write a little wrapper around post-review to automatically post however this function fails when it comes to Dim results As String = sOut.ReadToEnd() and I can;t suss out why, Edit: It doesn't produce an error it just seems to go into ReadToEnd() never to return Am I just missing something obvious? Function p...

Is there a .NET based CSS abstraction library?

I've been working on a really large project for almost 2 years and the client requirements keep changing. These changes, of course, effect everything and I would like to find a way to work with the CSS in a more dynamic fashion. I assume I could get one of the ruby or python CSS DSLs running under ironRuby/Python but this client is very...

.NET splitter control display

Hey, I created a Winform in VB.NET, and I added a Splitter control to allow resizing of panels during runtime. My issue is that the splitter control is not apparent. I would like to make it appear in a way that the user would know the form can be resized. At the moment, I basically just changed the color, but I don't like how that l...