vb.net

How do I scrape information off ASP.NET websites when paging and JavaScript links are being used?

I have been given a staff list which is supposed to be up to date but it doesn't match an intranet People Finder which is written in ASP.NET. As the information is sensitive I am not able to access the database the People Finder is using so the only way I can get at the information is by scraping the structure starting at the top brass ...

User DataSet Editor

When the user clicks an "Edit" button on my form, I want a box to come up which allows the user to edit a DataTable in a strongly-typed DataSet. What's the best way to do this? ...

ASP.NET CSV Excel issue with strange characters

I'm exporting a table of data to CSV format, e.g.: "COL1","COL2","COL3" "1","some text", "£232.00" "2","some more text", "£111.00" "3","other text", "£2.00" The code to export is fairly simple using an ashx handler: context.Response.Clear() context.Response.ContentType = "text/csv" context.Response.AddHead...

creating a radiobutton control in vb.net

ok this is my code in vb.net behind where i am creating the radiobutton - TD = New HtmlTableCell Dim rdb As New RadioButton() rdb.ID = "rdb_ads_" & DR("ID") TD.Controls.Add(rdb) TR.Cells.Add(TD) It displays the radiobutton, but doesnt select single. i can select all at o...

FileSystem.GetFiles() + UnauthorizedAccessException error?

Hello, It seems like FileSystem.GetFiles() is unable to recover from the UnauthorizedAccessException exception that .Net triggers when trying to access an off-limit directory. In this case, does it mean this class/method isn't useful when scanning a whole drive and I should use some other solution (in which case: Which one?)? Here's s...

MS-Access: TableAdapter UpdateCommand for table without primary key

What's the syntax for an Update query for a table without a primary key? Disclaimer: Frustratingly, adding a primary key is not an option. My program is a small program in a much larger system with poor data management. My development time does not include rewriting the other software. Note: The database is Microsoft Access. Note: S...

Update XML element with LINQ to XML in VB.NET

Hi, I'm trying to update an element in the XML document below: Here's the code: Dim xmldoc As XDocument = XDocument.Load(theXMLSource1) Dim ql As XElement = (From ls In xmldoc.Elements("LabService") _ Where CType(ls.Element("ServiceType"), String).Equals("Scan") _ Select ls.Element("Price")).Fir...

VB.Net equivalent of C# "As"

What is the equivalent in VB.Net of the C# As keyword, as in var x = y as String; if (x == null) ... ...

matching repeated group using regex

I am trying to capture urls in an html page that is being repeated and it usually works when the urls are on different lines but in this case they appear all in one line and separate lines. The url has the tags: Here is what I have been trying Dim regex As Regex = New Regex( _ ".*<a.*href='http://(?&lt;Link&...

Run Command in VB.NET

What function in VB.NET simply takes a string parameter and runs a command? It would work just like the OK button in the Start -> Run dialog. Dim myCommand as String myCommand = "excel C:\Documents and Settings\JohnDoe\Desktop\test.xls" Run(myCommand) ...

c++ to vb.net , problems with callback function

I'm having a hard time here trying to find a solution for my problem. I'm trying to convert a client API funktion from C++ to VB.NET, and i think have some problems with the callback function. parts of the C++ code: typedef struct{ BYTE m_bRemoteChannel; BYTE m_bSendMode; BYTE m_nImgFormat; // =0 cif ; = 1 qcif char *m_s...

How to seralize only some properties in .Net?

This is for a web project so i have several classes that inherit from Web.UI. I only want to serialize very particular properties (basically, only local properties) I'm aware of the XMLIgnore property that can be placed on a property to ignore items, but this won't work in my context since that would require modifying a bunch of stuff ...

Connecting to NTLM/LDAP on local machine on workgroup

I am very new to NTLM/LDAP and trying to authenticate using NTML running on a local machine. The code provided by Microsoft ( http://support.microsoft.com/kb/326340/en-us ) seems to work, I just do not know how to connect to it. I know that the authentication service is running because Contos 8 has been set up to authenticate using NTLM...

Understanding RTF and edit it with vb.net

I have this RichTextbox in my vb.net form and I would like to when a user click a button, for example to embold the selected text, how would I do this. Also, I do NOT want to use the standard vb.net expressions such as RichTextBox1.SelectedText.Font.Bold = true. I want to do something like RichTextbox1.SelectedRTF="[bold]" & RichTextBox...

Custom XML Serialization, how to write custom root element?

I'm probably just doing this wrong, i know. I'm using custom serialization and when the xml is generated it's putting the class name as the root element Example: <MyClassName> <MyIntendedRootNode> <ObjectType> <Property1/> <Property2/> ... I'm invoking the serialization by calling xmlserializer.Serialize(writer,Me) so ...

Help decoupling Crystal Report from CrystalReportViewer

I'm using Visual Studio 2005 with VB.NET. I have a number of Crystal Reports, each with their own associated dialog resource containing a CrystalReportViewer. The class definitions look like this: Imports System.Windows.Forms Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class dlgForMyReport ...

Save Xml in an Excel cell value causes ComException

I am trying to save an object (Class1) as string in a cell value. My issue is that from time to time I have a ComException: HRESULT: 0x8007000E (E_OUTOFMEMORY) (It is kind of random but I have not identified any particular pattern yet) when I write the value into a cell. Any ideas will be welcome For illustration purposes: Let Class1...

Will my shared variables loose value? (asp.net vb)

I have a class includes.vb that holds some variables (sharing them with other pages) like: Public Shared pageid As Integer = 0 I then have a function that does some work with these variables returning them with values; Return pageid When I step through the code, the variables have values (while stepping through the function), but w...

replace " in vb.net

how can i replace the double quote in vb.net? it doesn't work this code name.Replace("""," ") ...

datagridview databinding to a datasource in vb.net

hi, can someone give me a very detailled tutorial on how to bind datagridview to a datasource. assume I have a datagridgrid view with the following header text: username and password. I selected data from the database doing the following: select username, password from login. now how can i use this query to fill my datagridview? thanks...