vb.net

Registry key value setting in aspx.page

VB.net code for .aspx page Dim header As String Dim footer As String Dim margin_left As String Dim margin_top As String Dim margin_bottom As String Dim bottom As Double footer = "" header = "" IERegKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\PageSetup", True) 'footer = IERegKey.GetValue("foo...

Instance giving a Object Reference error

Hi there, I've written a new DAL and BLL, but when I try to create an instance of my class, I get an Object Reference error, is there anything particular I should be looking for? I am fairly new to this concept? Call is such: Protected Sub btnSignin_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles bt...

How to load TreeView Serialization into GridView

From a TreeView, I get this XML serialized: <?xml version="1.0" encoding="utf-16"?><node text="&lt;span id='c6f5ab9e-d08f-448a-9143-02d174317c07' oncontextmenu=&quot;SetContextMenu(this.id, event);return false;&quot; &gt;Zürich&lt;/span&gt;" value="c6f5ab9e-d08f-448a-9143-02d174317c07" navigateurl="" populateondemand="False" showcheckbo...

Read text file within a .NET project

Is there a way I can open and read a text file within a .NET project? I know I can use the System.IO.StreamReader class to do it for a Windows text file. I'd like to store some SQL scripts for upgrading my database in text files within my project. Since I'm writing this in VB I can't just paste the scripts directly into my code due to l...

How do I store TIFF files in Oracle?

I have an ASP.NET application (vb.net codebehind) that has serious performance problems because of its storage of TIFF files in one server share. There are over a million .TIF files there now! The application tracks the scanned images of property with a corresponding row in an Oracle database table. We have this idea that it might be bet...

Toggling TopMost in VB.NET

I have a form that has to be on top for a period of time, and then can be set behind other windows normally. Is there anything in addition to setting Me.TopMost to True or False that needs to be done? I ask because it doesn't seem to be working. ...

How to use PagedDataSource.CopyTo (or otherwise work with the same data I'm sending to my Repeater)

I'm populating a Repeater with a PagedDataSource and after I populate that Repeater, I want to perform some other operations on the subset of data that makes up the page I'm sending to the Repeater (my CurrentPageIndex, PageSize=10). So my question is how to get at those 10 records? From reviewing MSDN, it looks like I should be able t...

.NET BinaryWriter.Write() Method -- Writing Multiple Datatypes Simultaneously

I'm using BinaryWriter to write records to a file. The records are comprised of a class with the following property datatypes. Int32, Int16, Byte[], Null Character To write each record, I call BinaryWriter.Write four times--one for each datatype. This works fine but I'd like to know if there's any way to just call the BinaryWriter.Writ...

Constant Values Required in Variable Declartion

We are using a custom API in our project which provide an attribute for class fields/members which lets the interface to present a popup of some range values like "On/OFF" and pass the corresponding values of the choice to our code. The attribute requires a string array to know that values. We have many enumerations defined for these ra...

Initialize Object Properties in One Line of Code

Question: Hello All, Sorry that this is kind of a noob question. I just don't know how to word this process, so I'm not sure what to Google for. I'll put some C# code below that should explain what I'm trying to do. I just don't know how to do it in VB. Additionally, for future ref, if you could tell me what this process is called,...

Deleting a file causes an untrapable error

In my app i have to copy and then delete image files from memory cards, the problem comes when some of the card inadvertantly have the "Lock" switch engaged turning them to read only. When trying to delete these files i want to log the failure to delete but not show any UI messages until a time of my choosing. Here is some sample code ...

Requiring a method to be called in a child class constructor

How do I force the Visual Studio compiler to generate an error when a required method is not being called in the constructor of a child class? Like when you edit the form designer code, the compiler complains when InitializeComponent()isn't the first call in the constructor of a form. Is this even possible in VB.NET? ...

VB.net Examples for Prism MVVM In Silverlight

Hey guys IM Looking at Implementing MVVM in Silverlight. Kind of new to Silverlight and I'm Definately new to MVVM Pattern. I get it all But I want A set of small Prism VB.Net MVVM exmaples if that makes sense. Anyone have anything ...

ASP.NET - VB.NET - Persist a GridView's dynamically chosen DataSourceID over multiple button clicks

I have an app where I need to dynamically choose an SQLDataSource for a GridView so I can use 1 of 2 stored procedures, depending on who is logged into the system. My problem is that I am using logic like this, in the button click... If Session("SiteType") = "Type1" Then GridView1.DataSourceID = "SqlDataSource2" Else GridV...

DatetimePicker: Invalid Reg Exp

I am using the below Regular Expression which works fine in case of date validation. But if I select the date from the DatePicket even then it throws alert:Enter valid date. How can I modify the regular expression so as to be compatible with DatePicker. Set RegularExpressionObject = New RegExp With RegularExpressionObject .Pattern...

visual basic 2008 32bit/64bit ?

can vb.net 2008 bet set to only run in 32bit? ...

Program for fetching email from the inbox in VB.NET

Possible Duplicate: Recommendations for a .NET component to access an email inbox I am trying to develop an application to parse email messages. I wrote that program in PHP. It is now working. But the problem is I can not complete my requirement. Now I try to do this in VB.NET or any type of language that is supported by Visua...

WCF basichttpbinding with a XML Parameter

I am new to web development and WCF. I am tasked to create a WCF application/service that can be accessed by other technologies as well. Thus I ended up with basichttpbinding. I will have a XML parameter. Here is my code: <OperationContract()> _ <WebInvoke(Method:="POST", UriTemplate:="")> _ Function ReceiveMessage( _ ByVal...

Object being passed to Function, but not being received... why?

I'm not having any errors from these pieces of code, they're just empty everytime. I'm wondering if I perhaps have created them incorrectly. Help as always, hugely appreciated; Dim l As New Log() l.Log = "Attempted staff login with username [" & txtUsername.Text & "]" l.LogId = 0 l.StaffId = 4 l.LogDate = Date.Now() l.Insert() .Inser...

Changing activeindex numeric to text

I have an asp.net page, i want to change the active index numerical values to text values? like......... currently it is 1 to 2 and it goes like increasing............ instead ..i want a,b,c,d ............ ...