vb.net

ASP.NET User messages on MasterPages

Hi, i have an admin master page where i want to place a label which i can control with two functions (setErrorMessage and setSuccessMessage) both functions assign strings to label's text property and change CssClass property according to function type. I want to use these functions from nested pages while the control remains centralized...

AllowDrop does not appear in intellisense menu

Why does the AllowDrop property in VB.net not appear in the intellisense menu of a control? Also why is it not in the propeties window of the designer? ...

itextsharp: how do i add a new page and write to it?

in vb.net i filled up the first page of a pdf document, how do i start from the second page? ...

itextsharp: detecting if text / images are not fitting on page

i am generating a report in vb.net using itextsharp. sometimes the entire report does not fit on one page and i need to know when itextsharp is adding a page to the document. is there a way to detect this? ...

How to start a windows service in Visual Studio 2008?

IN Visual Studio when I try to start a windows service project it tells me I cant because I have to use "NET Start" and so forth. I remember in VS 2003 that when I pressed play it started the service and stop stopped it. Is there any way that when I press play or start for that windows service project I can have this same functionality....

Session variable removal question. as related to a paged data source.

Hello All, I have inherited some very old ASP.Net code. Written initially in 1.0 and then converted to 2.0 There is a page which uses a custom pager control. That control has the following logic in it: Private _DataSource As PagedDataSource Public Property DataSource() As PagedDataSource Get If Not IsNothing(Session("Data...

Generate a receipt number in this range

How would I go about generating a unique receipt number in the following range: GA00000-GZ99999? I am not allowed to use the 'I' and 'O' letters so GI00000-GI99999 & GO00000-GO99999 would be excluded. Ideally, I'd like to create this in T-SQL but can also do it in VB.Net. This number will be stored in SQL and I can access it prior to ge...

.NET Impersonation problem

I read a post on .NET impersonation at http://www.dotnet247.com/247reference/msgs/28/144136.aspx, and that is the base code I am working from. I'm having a problem copying a file to a network share. When finished, this console application will run on a remote server and copy files to a share on a different system. The two systems can se...

DateTime to UnixTime Stamp in .net

Is there any function in vb dot net to convert datetime to unix time stamp If I google I get only the vice versa but not vb.net to unix time stamp Any help is appreciated ...

Build add-in for VBA IDE using VB.NET

I have asked this elsewhere, but have never found anyone knows how to build an add-in for VBA IDE using VB.NET. Is it even possible? Could someone point me to an example? ...

matching fields in a database, ASP.net (VB)

In a table I have news posts with these fields: Title Content OwnerID And a users table ID Name Surname The OwnerID relates to the ID in the users table, how can I get the name of the user who's ID matches the OwnerID? I'm writing a website in ASP.net (VB). ...

SELECT from an SQLite database and assigning it to a variable

I am trying to retrieve a password from an SQLite database. The id of the row the password is in is 1. I want to assignt his password to a variable called actualpass. This is as far as I got before I became stuck. Can anyone help? Private Sub LoginButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBut...

Perform an aggregation on a DataTable with Linq in vb.net

Given a datatable, I wish to output an IEnumerable type (dictionary(of T) would be perfect, otherwise a datatable would be acceptable) that provides an aggregation of the data within the datatable. In SQL I would write the query as such: select groupByColumn, sum(someNumber) from myTable group by groupByColumn In VB.NET the closest ...

VB.NET 2003 copy log4net.config to bin folder

I'm using VS.NET 2003 and VB.NET. I have placed my log4net.config file in the same folder as the source code and I want to automatically copy the log4net.config file to the bin folder just as the app.config file is copied to bin. Is there an automatic way to do this? ...

Value from text box not saved properly in database.

I am using ASP.NET 2.0 with SQL Server 2005. My page have a text box where TextMode="MultiLine"......see below Now when I save this text in my database of course it does not save it with any HTML tags, and thus when i read that value from the database it comes back as 1 line such as.... Hello word, It needs to look like this. Tha...

C # to VB.NET - Using interface

Hey, I wonder how all this is in VB.NET In C# UserSettings vUsers = new UserSettings(); UserSettings.IUserSettings vUserI = (UserSettings.IUserSettings)vUsers I took a chance to try to write it in VB.NET, but is this right? In VB.NET Dim vUsers As UserSettings = New UserSettings() Dim vUserI As UserSettings.IUserSettings = (UserS...

Read form variables

hai sir how to read or list all declaration variable in form using vb.net 2005, example, dim lrs as new odbc.connection dim lstrtemp as string i want to list lrs,lstrtemp. Is this possiple please help me sir. By Somu. ...

Sending an email attatchment increases the attatchments file size in .net

I am currently working a piece of code which needs to send an attachment in the email it generates. The attachment is a PDF document. Due to requirements I am unable to save the PDF and send it, so I have had to create a memory stream attachment. The issue I have with this is that the file size is _500KB. However save the file on my ma...

Marking Parameters as Nullable

I've picked up some code from a colleague, and in one of his methods he has a boolean parameter: ByVal showProactiveChases As Boolean?. I had to look up the ? operator yesterday to see that it denotes a Nullable type. My question is, if I change it to: ByVal showProactiveChases As Nullable(Of Boolean), does the meaning remain the same? I...

Vb.net UDPclient class Checksum set to zero ..

I wrote a program of udp send and receive . I works with applications written in the vb.net but when I tried to send that udp to another GPRS device it don't work. Dim sock as new udpclient(3030) sock.send(Buffer,ep) And Wireshark also gives error that BED UDP HEADER CHECK SUM ... Can I set UDP checksum in UDP packet ?? Any other way...