vb.net

Deseralizing XML into simple .NET class, cannot populate property from root node attribute.

I have a simple class that I trying to populate from an XML document. The XML file has an attribute called TrackingID in the root node which I would like to get as a property. For some reason, when I deseralize the class, the TrackingID is null. Everything else populates fine. I have tried various attributes on the TrackingID property ...

Check Validate Text in Textbox + Windows Forms

Hi All, I am new to Win Forms, I have a scenario here.. When User enter ID in a textbox, I want to check that value in database and get the name for that ID before submitting the Submit Button. In webforms it can be done using OnFoucs and OnBlur events but how can I do here before submitting the button. I am using .NET 1.1 Regards ...

List.Contains returns false, even though it seems it should return true

Sub pageload() Handles Me.Load Dim bom As New List(Of Car) Dim car1 As New Car With {.Name = "Pea", .Year = 2} Dim car2 As New Car With {.Name = "Pea", .Year = 2} bom.Add(car1) MsgBox(bom.Contains(car2)) End Sub WHY??? I mean the object has the exactly same data, so why does it say it is not contained? ...

updating properties of a class with dynamic references

Sorry for what is probably a very basic question. I have a vb.net class with properties defined as follows: Private m_Property1 As String Public Property Property1() As String Get Return m_Property1 End Get Set(ByVal value As String) If IsNothing(value) Then m_Prop...

ctl00_CPHContent in .net

I am using vb.net master pages and .net is putting ctl00$CPHContent$ and ctl00_CPHContent_ before the control ID and control name. I am trying to use the findControl to look for my control but it is not finding the controls. any ideas or suggestions..... I can't use javascript to find a solution ...

XML and ServerXMLHTTP problem

Error Type: msxml3.dll (0x80072F0C) A certificate is required to complete client authentication I am sending an XML file to a remote server putUrl =https://www.myweb.com/test/drhandler.php xml_put = "<?xml version=""1.0""?><subscription id=""" & "14" &"""><status>" &"das" & "</status></subscription>" Public Function SendBatch(xml_p...

populating a table from sql server through vb.net including dropdownlist and checkboxes

this is the scenario. I have 1 aspx file with a table in it. it has a .aspx.vb file behind it. i want to populate this table from the .vb code. the table shall have many lines (rows) but they should be in this format. also the checkbox data, textbox data and dropdownlist data comes from database behind. how should i go about thi...

Are all disposable objects instantiated within a using block disposed?

This is a question I have asked myself many times in the past as I nested using statements 5 deep. Reading the docs and finding no mention either way regarding other disposables instantiated within the block I decided it was a good Q for SO archives. Consider this: using (var conn = new SqlConnection()) { var conn2 = new SqlConne...

Inserting into a Access DB with an AutoNumber PK and getting an Insert syntax error

I am trying to insert into a access db and the PK is an autonumber that is generated by the DB. I am getting a syntax error for the insert statement and dont know why. If possible I would like to return the autonumber value in the same statement. Here is what I got so far. Dim cn As OleDbConnection Dim cmd As OleDbCommand D...

how do i add htmltablecell data to database after i click submit

i created an htmltable in .aspx.vb, because i have a lot of rows that come from database and they depend on the querystring. that part is fine. But when someone makes a change in one of the cells how do i save data back to database? code - Dim tr As New HtmlTableRow Dim td As New HtmlTableCell td = New HtmlTableCell Dim txtbox1 As New...

Textbox search with dropdown results

I (think I) want to develop a custom control for my program in VB .net where I type into a textbox and simple search results will then be displayed underneath it (from a predefined set of items). Like auto suggest in google search. I believe the combobox does something similar to this but I think it only works on prefixes. At the momen...

Generic Error in GDI+ when calling Bitmap.getHBitmap()

I'm writing an application which as part of it draws an image on a Logitech G15v2 keyboard's LCD. For the most part the function works fine, but after a while of running, one of the lines throws a "Generic Error in GDI+" The problem, according to a stack trace, is in Bitmap.GetHbitmap(): at System.Drawing.Bitmap.GetHbitmap(Color backg...

How to delete temporary files using Asp.net

In my application, I have some reports which needs to be viewed frequently.After viewing the reports many times by different users, it shows load error.For different systems, many temporary files are created.i need to delete those files in my single system.now i manually deleting all the temporary files in the temp directory and configur...

Updating the table with conditon problem

Using SQL Server 2005, VB.Net In my application am using 3 textbox Textbox1.text = Date Textbox2.text = TimeIn Textbox3.text = TimeOut I want to update my table by using the textbox value with condtion For Example Textbox1.text = 23/02/2009 Textbox2.text = 10:00 - HH:mm Textbox3.text = 18:00 Query update table1 set TimeIn = '" ...

Disabled textbox/textarea still active

I have a multi-line textBox disabled through vb.net : myTxtA.enabled= false The html it outputs : <textarea name="myTxtA" rows="10" id="myTxtA" disabled="disabled" style="width:99%;"> ... </textarea> That's the source code I get through the browser but the textArea is still editable in the browser. There is no javascript modifying ...

IP Logging vb.net

I want to log the ip's of the users that use my vb.net program. First of all, is this legal? If it is, how can i log the ip's in a textfile on a webserver? Im thinking about a small non-visible webbrowser that sends the ip to a .txt file. ...

dataSet in Web Service

Hi! I am using UltraGrid for inserting data in table. The problem is that i need to do insert,update, delete with web service. I am getting dataSet from web service and display it into grid but when I do some changes on the grid for example insert or update data, I need also to send new dataSet to web service so that web service do upda...

setup vb.net web browser to read javascripts

How can I setup vb.net web browser to be able to read a javascript on its own. Because when I try to access a webpage with a calendar(making the date input easier for the users) it tries to open the script using internet explorer. Which takes longer. ...

linq sum string as decimal

I have the following LINQ : Dim q = From p In ds_raport.Tables(1) _ Group p By p!Cod_Prj Into g = Group _ Select New With {g, .TotalVal = g.Sum(Function(p) p!Valoare)} The problem is because column "valoare" is of type string ( i import this from a file that is not always properly formatted) my sum has no decimals. So...

Casting from Generic IList to Object during DataBind

Okay, so I have a Generic IList of custom objects that I want to use as a datasource for a repeater. Dim productRows As IList(Of MyCustomObject)() 'fill list with data rptResults.DataSource = productRows rptResults.DataBind() In the WebForm inside the repeater, I place this code: <%# DirectCast(Container.DataItem, My...