In a recent project I was working I created a structure in my class to solve a problem I was having, as a colleague was looking over my shoulder he looked derisively at the structure and said "move it into a class".
I didn't have any argument for not moving it into a class other than I only need it in this class but this kind of falls ...
Given an extension method like this:
Public Sub RehydrateTo(Of T As New)(ByVal input As String, ByRef output As T)
Dim ms As MemoryStream = MsFromString(input)
Dim f As New DataContractSerializer(GetType(T))
Try
output = CType(f.ReadObject(ms), T)
Catch ex As SerializationException
output = New T
Dim ild ...
Hi
Not sure that this is a valid programming question ... but is it possible to program infa red using vb.net express (iRDA) Got a programming project in my mind, but none of the coding examples work, IrDAClient never gets recognised
Cheers
...
Is it possible to use Console.Write to place a single character at the very bottom right of a typical 80x25 console, without having the console scroll the row up? This is the code that I'm using...
Imports System
Console.SetCursorPosition(Console.WindowWidth-1, Console.WindowHeight-1)
Console.Write("x")
This is not working like I woul...
Is there an alternative to load data from a datagridview into a class than to iterate through the datagridview?
...
I have tried everything.but im not able to insert updat and delete the excel file..im able to connect the excel sheet.the connection also seems to be opened...here s my connection string:
Dim sConnectionString As String
Const kunal = "C:\"
sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Sou...
how can i call a VB function - deleteevent() in usercontrol.ascx.vb from a javascript function in clickhandler(e) in usercontrol.ascx. The call should cause a postback because i need the usercontrol to display the changes.
i am currently trying to do it by using a linkbutton with style display:none, and calling its click event from the ...
I am using ASP.net(2.0) with VB.NET.
I have a User registration form.
On that form the user supply all his contact details and he can upload a image with the normal file upload control in ASP.net.
This is my problem.
If anything goes wrong on the page then i give the User a error message saying what he left out or what went wrong. But ...
Hi
Any code examples on how i must go about creating a folder say "pics" in my root and then upload a images from the file upload control in into that "pics" folder?
If you don't want to give me all the code, i will be happy with a nice link also to show me how this will be done in VB.NET (C# is also ok).
Thanks in advanced!!!
...
I have a class that contains a list of properties which serializes just fine. However I need one of those properties to contain a collection of another class to give me sub classes
Example XML
<VideoOptions>
<property1>value1</property1>
<property2>value2</property2>
<property3>
<item>
<property1>value1</property1>
</item>
<item>
...
I have an existing application that uses Active Record for its data retrieval. It's in VB.NET (first time I'm doing VB.NET; I usually work in C#). And I'm building a method to return a List(Of T) of an object.
The current pattern uses a SQLDataAdapter to populate a datatable. I COULD add the record to the List(Of T) as I fill the datat...
I'm currently maintaining some old code for a company. As it would happen, the current app I'm modifying uses an older version of the in-house library (we'll call this Lib1.dll). They also have a new version of the library called Lib2.dll that improves upon the previous library in many ways.
Unfortunately, Lib2 is not backward compati...
Hi,
I am coding in Visual Basic Express 2008.
I have 2 forms in the solution. Form 1 is the main form and form 2 is the child. The child form being displayed after using a button with the code "Form2.ShowDialoge" I want to select the new row in the datagridview on Form 1 and populate it with data from form 2 without typing on the ne...
I'm teaching myself VB.Net.
Here is a problem I have recently come across. Say I have a main Form1 in my application. Form1 calls a second LoginForm which (like the name suggests) is a login window with username/password type fields. Expected behaviour is that LoginForm will capture login details and pass them back to Form1.
What is th...
Hello!
I was looking for a way to get a direct link from mediafire's file hosting service. By default, when a user visits a download link, he will be presented with a download page where he has to wait for the download to be processed and then a link will appear.
This link will appear in the div id 'download_link'.
I googled and found ...
this code never fills the grid view I know that somthing is wrong here the code
Imports System.Data
Imports ZidduDataSetTableAdapters
Partial Class _Default
Inherits System.Web.UI.Page
Dim filesAdp As New FilesTableAdapter
Dim filestable As New ZidduDataSet.FilesDataTable
Protected Sub btnfill_Click(ByVal sender As Objec...
I'm trying to put together a plugins system with .NET, and I'm not sure if I'm doing it correctly. The basis of the system is that a specific directory ({apppath}/Plugins/) will have a bunch of precompiled DLLs, and I want to look through each one with reflection, and for every class available, if it inherits a specific base class (this...
i make the adapter.insert and the adapter.delete and both work good but not with the adapter.delete even i put only on argument here the code
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
usersAdp.Fill(userstable)
usersAdp.Update(txtid.Text, Me.txtname.Text, Me.txt...
how can i call a VB function - deleteevent() in usercontrol.ascx.vb from a javascript function in clickhandler(e) in usercontrol.ascx. The call should cause a postback because i need the usercontrol to display the changes.
i am currently trying to do it by using a linkbutton with style display:none, and calling its click event from the ...
How can I choose which resources to compile depending of the compile constants used? So, if VAR1=0 then I wouldn't add RESOURCE_A to my final assembly.
I searched around, but didn't find any info regarding this... I guess I'm using the wrong keywords, since I doubt nobody else had this problem/doubt ever before.
Also, I use both VS2005...