listA is list of integer
dtListB is DataTable
I'm checking that if StudentId of ListA doesn't exist in dtListB, then add it to the dtListB.
Dim stidListA, stIdListB As Integer
For Each la In listA
stidListA = la.StudentId
For n = 0 To dtListB.Rows.Count - 1 Step 1
stIdListB = dtListB.Rows(n)...
I have a textbox which can be left blank or contain a date. If the textbox has a date I want the 2nd textbox's value to be set to the value of a session variable. I need this to happen before the update sql is performed on postback.
This is the code I have. But the textbox is coming back as nothing. Whether it has a value in it or n...
Hi.
why visual Studio Does not have Refactor tool for vb.net by default ?
but it has this tool for c#.
for example extract method and etc.
thanks all.
...
My issue is to Find exact one Calendar object from a List Of(Calendar) by passing a particular date. I got to know about the predicate but not sure about passing parameter to it.
colorcode is List Of (Calendar) and calendar class has a property called DtmDate with which I want to compare and return the desired object.
Dim a As Calenda...
Hi,
I developed a excel add ins using VB.NET 2005. and in this when i adding page break below error is occurred :-
This action exceed the number of page breaks you can manually add to a worksheet. a worksheet can contains up to 1026 horizontal page breaks
So can any one suggest how i insert more than 1026 page break or any other s...
Hi there,
I have a form containing a listbox showing a list of image names. It's bound
to the database table. When an image name is clicked it shows the image and
imagename in a picturebox and textbox respectively. When no image is selected
in the listbox, a new record can be inserted by browsing a new image in the
picturebox by an ...
Hi all,
I would like to improve testability of some legacy code. To achieve this, I am introducing interfaces for existing classes (and have existing classes implement those) and factories that create an instance of a test object or an object of the original class, depending on some configuration setting.
I can foresee some internal fe...
I read somewhere that interfaces can have member variables.
Static final constants only, can use
them without qualification in classes
that implement the interface. On the
other paw, these unqualified names
pollute the namespace. You can use
them and it is not obvious where they
are coming from since the
qualification i...
I am currently developing a WPF application that will utilize existing WinForm dialogs. I'm experiencing a long lag between the time I call ShowDialog() on a WinForm to the time it is displayed.
Even when reusing WinForm dialog objects the lag time is nearly as bad on the second hit. Meaning that the problem isn’t in the constructor.
D...
Hi,
I am using following code to send emails. It works from a computer where I have installed Windows XP but does not work from a computer where there is Windows Vista.
Could anybody explain what I should do?
Try
Dim oSvr As New Net.Mail.SmtpClient("mail.server.com")
Dim oMail As New Net.Mail.MailMessage
oSvr.Credentials =...
Hello.
I have the following gridview that is inside an updatepanel:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="ButtonAdd" runat="server" OnClick="ButtonAdd_Click" Text="Novo Artigo" />
<asp:GridView ID="Dados" runat="server" AutoGenerateColumns="False" CssClass="Grid">
...
Hey whhat's up. I've been looking at some example source codes but I can't quite figure it out. I'd like to send a POST request to login to a website with my account. For an example, how would I login to this website using HttpWebRequest..
http://z4.invisionfree.com/cotec/index.php?
It's for an application I'm building for my clan wher...
Is there a way to get the instance's class name with VB.NET?
...
I was given a class that sends a post httpwebrequest to a website and here is the link..
http://joel.net/code/easyhttp.aspx
I was wondering if somebody could give me an example of how to use it for this website
z4.invisionfree.com/cotec/index.php?
I'm making an application where a user must log in with their forum account to use it.
...
Hi, I have a parent class (Foo) with shared methods. It is MustInherit.
Bar and Baz classes inherits from Foo. I will do something like that:
Dim baz as New Baz()
Dim bar as New Bar()
baz.sharedMethod()
bar.sharedMethod()
Within of Foo's sharedMethod(), I need to know who (class name) called it. So, using the above example, it would ...
We have a VB.NET program that needs to periodically call a function in an external, unmanaged DLL to communicate with our legacy application. We are having a problem with the application (seemingly) randomly not being able to find the DLL with the unmanaged code. Currently we use DECLARE FUNCTION blah LIB for the unmanaged code. Would...
I have a ListView with a CheckBox as one of the columns, bound to a boolean property of a custom object. I'm trying to figure out how to iterate through the items in the ListView and check all the checkboxes. What I have so far is below:
XAML:
<ListView x:Name="MyListView" DockPanel.Dock="Top" Height="275" IsSynchronizedWithCurrentIt...
Ok so here's the story.
I have an array of Assemblies which are initiated by [Assembly].LoadFrom() that load a number of DLL's. Upon initialising, a method called InitMain (from the DLL!) is called, which sets a number of variables outside of this method, like here:
Public Class Example
Dim C As Integer = 0
Public Sub InitMain...
Hi,
I have a single columned datatable inside a single tabled dataset.
I just want to convert this dataset to distinct rows. Here is my code, it gives compile error '.' expected. What am I doing wrong? (I tried adding the ., still same error). I know this is something stupidly obvious. PLZ Save me! ;)
Thanks much in advance!
Dim quer...
I have a class which I use to record a value in a given interval. I.e. the value between 0 and 1 might be 0.5, 1 to 5 might be 1, and 5 to 100 might be 5. However I would like to have this information stored in a class that uses generics.
So when I try to find out the value in a certain interval I would like to be able to call on a fun...