vb.net

Getting error while reading xml file

Hi friends hope all r doing well. I have a problem while reading xml file in vb.net i.e. giving error message "Data at the root level is invalid. Line 860, position 18." My xml file with error while reading is as follows. Actually i am saving this file using following code in vb.net from httpwebresponse. Try Dim strUrl As Stri...

Problem while Creating Dynamic ModalPopup

Hi, i want to create a modalpopup dynamically but i come across a problem.I pasted my sub here and i dont know what to do for that problem.When i want to show modalpopup,it says "Control 'mdldelete2' of type 'ModalPopupExtender' must be placed inside a form tag with runat=server." How can i solve this? Public Sub Raise_Alarm(ByRef p_P...

How to read XML data from a URL by using vb.NET and save

Hi, friends i am able to get xml file by sing bytes, perhaps which is getting some problem, can u suggest me alternate method to do the same thing to save xml file. Try Dim strUrl As String = "http://xyz.com" Dim wr As HttpWebRequest = CType(WebRequest.Create(strUrl), HttpWebRequest) Dim ws As HttpWebResponse ...

Exception handling: Is finally executed after throw?

Assume you have the following code: Instead of doing: Try ' ' Initialize some objects ' ' ' do something that fails ' ' ' Clean up-code that gets not reached because exception ' Catch e As Exception ' 'Clean up initialized objects ' Throw e End Try I would like to do: Try ' ...

Explicit interface implementation in VB.NET

How to implement explicit interface implementation in VB.NET? ...

How do I run a Flash exe file within a Window/Form in a VB.Net Project?

How do I run a Flash exe file within a Window/Form in a VB.Net Project? I do not have the SWF file so will have to use the exe file I have. ...

Single User after renaming an MS-SQL database

I am using help of SqlServer.Management.Smo to rename an attached MS-SQL database. Dim db As New Database = ActiveSQLServer.Databases(OLD_NAME) db.ExecuteNonQuery("ALTER DATABASE " & OLD_NAME & " SET SINGLE_USER WITH ROLLBACK IMMEDIATE") db.ExecuteNonQuery("ALTER DATABASE " & OLD_NAME & " MODIFY NAME = " & NEW_NAME) The problem is tha...

Getting the default SQL Server directory in VB.Net

I guess the default path for the SQL Server files is located at: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA Is there any way of reading the default directory with the .NET Framework? ...

How to read xml file and save using httprequest and response

EXACT DUPLICATE of http://stackoverflow.com/questions/1576534/how-to-read-xml-data-from-a-url-by-using-vb-net-and-save/ Hi friends hope all r doing well. Regarding this question i got some suggestions, but how to implement is confusion. Can any one help to implement so that the problem can solve. Try Dim strUrl As String = "h...

Can I retrieve the TITLE of an MS-DOS window using VB.net?

Using the below code, I can retrieve the image name and process ID of the DOS command window on a remote machine, but can I also retrieve the DOS window title? Dim current As Process = Process.GetCurrentProcess() Dim processes As Process() = Process.GetProcesses("REMOTE_COMPUTER") Dim ThisProcess As Process For Each Thi...

Timer interrupt problem in vb.net

I have 2 timers in MVB 2008 Express, one to control the fading in of a window and another to call a beep function every few seconds or so. The problem is that while the window is fading in, it pauses while the timer beeps. Any ideas? Threads maybe? ...

Select dropdownlist item after button click

I have an asp drowndownlist and I'd like to change its selection after a button click. I can't seem to find a way to do this, is there a way? (Its a reset button of sorts, and I would like the dropdownlist to return to the "default" value.) ...

.NET graph library around?

I am looking for Graph libraries for .net. Are there any out? ps: I mean GRAPH libraries, not graphics nor charting libraries! edit: What I mean is graphs, from graph theory: I also need it to have drawing capabilities. ...

WCF Serialization & Interfaces

Does link text mean I have to return a concrete implementation? Even though I am using svcutil with the /r that includes my entites(where IMyInterface is defined). I get no errors but it changes all List(of IMyInterface) to list(of Object) and I cannot deserialize it on the client Error: list(of object) cannot be converted to list(of IM...

Encrypting a file with RSA in Visual Basic .NET

I'm just getting started with Visual Basic .NET and I'm currently stuck on the following problem: how can I encrypt/decrypt a file with asymmetric encryption? Essentially, I'm trying to figure out how I can write the following pseudocode in VB: Function EncryptFile(path_to_file_to_encrypt, public_key) file = ReadFile(path_to_file_to_...

MVVM: Editing a Customer. How to find a workspace with the same object and to create a new workspace from another workspace

Just like this question, I'm learning MVVM using the sample created by Josh Smith and I wanted to add a functionality of update. Two problems arise (not addressed in the referred question): What is the best and light way to create a workspace from another workspace? How to find if there is already a workspace editing the same custome...

Easy way to concatenate list of strings into a comma-separated strings, where strings are members of an object?

Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members. Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function? Thanks! ...

HttpWebRequest POST and Cookies

Hi am trying to make an application that post data to a joomla login page but the only thing i get back is cookies is not enabled. Function GetPage(ByVal Url As String) As String Dim CookieJar As New Net.CookieContainer Dim enc As Encoding = Encoding.GetEncoding(1252) Dim Data As Byte() = Nothing Dim PostData As String ...

Product key Registration - Visual Basic

Hello, I am trying to make a product key registrar for my program. I want the product keys in a database or a dictionary type thing where I can make new keys everyday without putting them into the program, and redistrubate them everytime. I'm not sure where to get started, so if anyone has any ideas please post them thanks, kevin ...

Recording and saving sounds from applications?

I Would like to make an appliaction in c# (or vb.net) that records every sound that comes out from the speakers when i tell it to, and when im finished i want to push a button and save it as an mp3 (or some other format). So far i have only found APIs that can record something from a microphone. My Question is: Is there anything in th...