vb

How to get a null value from database to a checkbox in gridview

hi guys, i have a checkbox in gridview. <asp:CheckBox ID="chkStatus" runat="server" Checked='<%#GetStatus(Eval("VaccinationCompletedStatus")) %>'/> The function GetStatus is as follows Public Function GetStatus(ByVal objStatus As Object) As Boolean If objStatus = True Then Return True ElseIf o...

VB in Access: Combo Box Values are not visible in form view but are visible through Debug.Print

Code in Form onLoad: country_combo.RowSourceType = "Value List" Code in a reset function: Dim lListIndex As Long With Me.country_combo For lListIndex = .ListCount - 1 To 0 Step -1 .RemoveItem (lListIndex) Next lListIndex<br/> End With Code to populate country combo: *For n = 1 To numCountries* *country...

Need help in filtering out some vulnerablity causing characters in querystring

I need to filter out characters like /?-^%{}[];$=*`#|&@'\"<>()+,\. I need replace this with empty string if it is there in the query string. Please help me out. I am using this in ASP pages. ...

How to create an empty dictionary for optional argument in VB.NET

Basically, I have a function that has an optional dictionary argument. Since it's optional, it needs a default value, and I'd like to set it to an empty dictionary instead of Nothing. How do I go about that? In Java, I would simply do this: Collections.<K,V>emptyMap() How do I do the equivalent in VB.NET? (I'm using .NET 3.5). ...

Change Date Format

hi guys, I have date in format dd/mm/yyyy .I have to change to mm/dd/yyyy in codebehind of vb. Can anybody help to chenge the format. ...

How to compare fields with 'Memo' datatype in vba?

The MS access database does not allow comparing fields with 'memo' datatypes in SQL query. Is there a way to do it in VBA? Simple comparison does not work if the size of memo>255 characters ...

Modal problem with asp.net being programmed with vb.net

Hi, I have an ajax modal panel with a div on it that I access from the server and dynamically insert a table into, by showing the values of various controls on the calling form. My problem is this, it works fine if all my controls are doing auto postback, but it ruins the user experience, because tabbing through the controls, the contr...

data grid view

iam trying to create a master /detail datagridview on windows application. my master data grid view takes the data from the collection class. i want to create a detail datagrid view which is empty and data is entered by the User(optional) that is connected to master data grid view. for ex: if table 1 has rows like id name qty 1 cruit...

Get the key of an item on a Collection object

The environment is that the members I'm pushing into the Collection are nameless, un-identifiable (to avoid bad abstractions, and please, don't freak out: members are actually other Collection instances). In order to be able to make fast searches, I'm creating a meaningfull hash name for each new member, and provide it as the Key string,...

Sort WPF ListBox on button click?

First off let me just say I'm very new to coding so there are big gaps in my knowledge... anywho: Right, I'm trying to sort a WPF listbox when a button is clicked, preferrably in pure xaml (otherwise VB). I'm having a hard time seeing as most samples are written in C#. Here's my code: <Grid.Resources> <CollectionViewSource x:Key...

How do I auto-create a code snippet in Visual Studio 2008?

I'm trying to create an interface that automatically implements a fully typed out method in VB.Net However, I can't figure out how to do it. I wanna do something that's similar to what happens when you implement IDisposable, where it gives you the full function, including codes and comments. I know how to make a code snippet and how ...

How do I configure base class libraries in my app.config file?

I've found a couple of snippets of information pertaining to app.config/web.config that hints at almost codeless configuration of BCL components directly through the app.config. However, given the amount of tags suggested by the intellisense within the app.config, it suggests that there is a huge amount of possibilities for this that I ...

Error regarding selection of calendar in different versions of IE

hi guys, I am running .Net application in which i can select a calender(ajax) in IE6 but not possible in IE7. how can I correct it in IE7 ...

What language to use

I've programmed in VB5 (and a little VB6) in the past, used MS Access at a 'writing code' level but this was all a few years ago and I've only used PHP more recently. I'd like to get back in to programming for the PC (Windows...) but not sure where to go with a choice of language. VB.Net? C#? ....any suggestions? Something easy to pick u...

Fail to load values in textboxes

hi guys, I have textboxes which is placed inside accordian (ajax control).In pageload event i have written the code to load values in textboxes. But onload event one error is coming as object not set to instance of a object. Values are not coming in textboxes. Then i tried to initialize controls in textboxes .Then the error cleared...

Two if statements?

I have two if statements and my project sees one and not the other. Here is the code: If (IsPostBack) Then HandleUploadedFile() End If Dim savePath As String = "Images\ " If (fileUpload.HasFile) Then Dim fileName As String = fileUpload.FileName savePath = Server.MapPath(savePath) + fileName fileUpload.SaveAs(savePath) Me.Lab...

Excel Formulas/VB: Show total based on date entry

Hi, all. I'm trying to accomplish something in Excel that I'm pretty sure requires some VB work, which I've never actually done, before. I've got a spreadsheet with two columns that represent the number of processed records, and the date the records were processed. In some cases, the records can be processed in multiple batches, so th...

Need help with making a program that hits space every * seconds.

Well, I am making a program, (I need help with the codes) to hit the space bar every * seconds. When you hold down a key it will spam 3 times every 2 seconds. Or whenever you press space (meaning the key). can you help? I need the exact codes. I've tried Sendkeys.send {"Space"} Etc. I've been trying for a while. I cant seem to figure it...

One line if in VB .NET

Is it possible to do one line if statement in VB .NET? If so, how? ...

VB Brackets in Enum?

I'm finding this in some legacy code and just curious what the brackets are for? Public Enum myEnum none = 0 abc = 2 def = 4 ghi= 6 [jkl] = 8 mno = 9 End Enum ...