vb.net

how to populate the textboxes inside a gridview from a datagrid in asp.net?

I am using a gridview in my form.aspx page. The textboxes in each row of the gridview are to be populated from a datagrid upon clicking a particular field of the datagrid. Is there any way to do the same.....? ...

Automatically Restarting a chat server application on system restart

I developed a chat application with an attendant chat server. Everything is working fine. The issue now is the fact that whenever the chat server goes down (for instance, the server system shuts down as a result of power failure or some other problem), by the time the server system come back on, the chat server would have to be restarted...

Remember selected row in DataGridView

I'm trying to get my datagridview control to remember the selected row after data refresh. The DGV is databound to a list of business objects: Dim FXs As SortableBindingList(Of FX) = FX.LoadAllForBinding(FXStatus) Dim bs As New BindingSource bs.DataSource = FXs The overall sequence is something like this: User clicks on a row Row i...

Temproray Asp.net files error

Hi when building my application I am getting some temporary files shown in Solution Explorer under Miscellaneous Files lie App_Web_YDKG.VB with following code block in that generating error Protected ReadOnly Property Profile() As System.Web.Profile.DefaultProfile Get Return CType(Me.Context.Profile,System.Web.Profile.Defaul...

VB.NET Filtering ListItems Problem

I am trying to filter a ListBox based on the presence of a string. Basically, if there is a ListItem that doesn't contain the string then I want to remove all ListItems that do contain the string. Here is what I have tried: Dim Item As ListItem For Each Item In CtheList.Items If Item.Text.IndexOf("W:") = -1 Then CtheList.It...

Enable to call C dll in VB.net Code

Hi, I am running into a problem which I am using C Dll into my VB.net code. I have .H file which shows implementation of this DLL in C language. This .H file contains many structures and unions that contain variable of some structures type. There is a main structure which contains the pointers to these structures and unions and finally a...

I want to test flash on my ASP.NET 3.5 website - any info on how i can?

I am using ASP.NET 3.5 and i am busy setting up a test site for the administrators to see if they can host my ASP.NET site with no problems. I have all ready added some Ajax and Session variables and now i want to add some flash in there as well. I have NO CLUE how to use it and where to start. Would i be able to just get some flash HTML...

Validating dropdownlist OR textbox

I have a page where a user can either select a vendor via dropdown or enter a vendor number via textbox. One or the other must have a value. I can do this in javascript easily but how can I do this using a custom validator provided by ajax all on the client side? Edited Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e ...

Transitioning from C# to VB.NET

Any suggestions on how I should approach this? Thanks. ...

Sub New() is not accessible in this context because it is 'Friend'

So what does this mean and how do I fix it? This message occurs if I place the New keyword in the line(s) below. If I remove it, i get an error at runtime saying I need to use New. What am I doing wrong? Dim oPS As AeccPointStyle = New AeccPointStyle ops = oDescKey.PointStyle Debug.Print(oPS.Name) Debug.Print(oPS.MarkerSymbolName) ...

Vb6 to VB.Net- How to replace registered dll concept

I am replacing a VB6 application with a rewritten counterpart in VB.Net. In the VB6 app there was a 'control' application which presented a form to the user and allowed them to select a 'client' from a drop down list. Selecting a client caused the reading of an ini file which set client-specific parameters, including the program names of...

ADO.net Entity Framework: Update only certian properties on a detached entity

I want to update an entity without loading the entity from the database first. I've accomplished this but only by knowing all of the entities properties and then using the "attachto" method. My issues is i don't want my app to need to remember all of the properties. Example: Dim customerEntitiy As New shopper customerEntitiy.shopp...

(.net) Logging the function logic of my program

Hello. I'd like for debugging purposes to be able to log what functions are called and in what order. So I've been just putting Debug.WriteLine("myFunctionName(args)") all over my functions, logging it in the end to a file. Isn't there a better approach to do this? I'd hope so. ...

(.net) When is an attribute's constructor run?

When is it run? Does it run for each object to which I apply it, or just once? Can it do anything, or its actions are restricted? ...

Which has more job opportunites - VB.NET or C#?

I know there are lots of Visual Basic vs. C# threads out there, but I think this is important. Are there more professional Visual Basic.NET or C# jobs? ...

(.net) Configuration Settings basic question

I am binding a textbox's text value setting to my a variable in my configuration file. I only consider the input from this textbox to be valid if it's an integer number bigger than 1. Right now what I was doing is letting the user write whatever he wanted in the box, and I'd only let him save the settings after calling a validation funct...

Bitwise operations

Hello A) (Int32)X | ((Int32)Y << 16); B) (Int32)X + (Int32)Y * (Int32)Int16.MaxValue; Shouldn't both be equivalent? I know from testing that the first works as expected, but for some reason the second doesn't. Both X and Y are shorts (Int16), and the return type is an integer (Int32). Shouldn't Y << 16 <=> Y * Int16.MaxValue? ...

WM_KEYDOWN : how to use it?

Hello. I'm trying to send a key stroke to one application, through PostMessage. I am using too Spy++ to try to understand how to send the message, as I do not fully understand its inner workings. In this picture, the first item(selected item) was made with an actual key stroke made by myself. The one with a red elipse around it(below)...

Is it possible to create VB.net module-like in C# on .Net 3.5?

I need to use some feature of VB.net that is Module for my Asp.net MVC project. But I found that C# can't handle Module like VB.net does. Please look at the following code. VB.Net - Globalization Project Public Module [Module Name] Public Const WebsiteName As String = "[My Website Name]" End Module VB.Net - Asp.net MVC View Page ...

How is a negative image figured out?

My program im working on does grayscale, builds an alpha mask, and splits the color channels. How do you invert a picture? the above are done looking at the image pixel by pixel. Im using vb2005.net, for the sake of speed is there other ways of doing those things using drawing.graphics? ...