vb.net

ASP.NET Binding with EVAL

Hi, I'm trying to do the following for asp.net combobox: Text='<%# IIf(Eval("Name").ToString().Equals(""), Bind("Other"), Bind("Name") %>' What I'm trying to do is if the "Name" column is empty then bind to "Other" column, otherwise bind to "Name" column. Anyone know the right syntax, keep getting object not set to reference. I'...

In C#, why does a datatable not know the type collection of rows?

I have recently started .NET programming, and looked at both VB.NET and C#. In VB.NET, a strongly typed Datatable cosisted of a collection of strongly types rows. Therefore, for example, this statement would work: lCustomerTable As CustomerDataSet.CustomerTable lCustomerRow as CustomerDataSet.CustomerTable.CustomerRow lCustomerTable ...

Select the content of textbox when it reveives focus

I have found a similar question to mine in http://stackoverflow.com/questions/97459/automatically-select-all-text-on-focus-in-winforms-textbox Now i am trying to modify or make it some more different by making it general. I want to apply same action to all the textboxes in form without write code for each one... how many i dun know. As ...

Linq Join Problem

Hi, i want to use linq to fetch data from datatable.I have 2 tables in Cache and i want to join these tables then get value from resultset.I pasted Original Sql query and my linq query here.My linq query returns nothing.Where do i miss?My original sql query returns 1 row ,but q1 is nothing 'Original Sql query select b.FL_DSD f...

Is there a free tool/plugin that can format code ect on the fly for VS C#?

Ive just moved from VB.Net to C#. I dont understand why people are using it/prefer it as it is soo much more time consuming! In VB.NET, you simply type your code and VB.NET formats is as you go, For example: removes unneccessary whitespace, automatically puts in brackets, tabs blocks of code, automatically creates the NEXT, END IF, sta...

Free iPhone like controls for .NET CF

Hello Everyone, I'm developing a mobile project that I really want to look good. I love the way the iPhone controls look and I'm wondering if anyone knows of any free UI components that can help me make my app look more like the iPhone? Specifically, I'm really wanting a GREAT looking listbox. Any ideas? Thanks! ...

Showing List of combobox while getting focus (vb.net)

Hi guys, When we click on drop down combobox control in our windows form, it shows the list automatically. But when we press tab and navigate to that control from keyboard it doesn't shows the list automatically. So in other to show the list automatically on receiving focus what should be done? ...

adjusting form for any resolution

i have made 3 projects in vb.net.for all those three projects i have used this code Me.WindowState = FormWindowState.Maximized my laptop resolution is 1366x768.for my resolution i'm getting the desired output but for any other resolution i'm finding the objects being misplaced. is there any way by which i can make my forms adjust fo...

script error in web browser

i have made a web browser in vb.net.but for few pages i find a msgbox displaying script error. script error ! an error has occured in the script on this page line: 86 char: 3 error: object expected code: 0 url: http://songs.pk/ do you want to continue running scripts on this page? yes no or u can see t...

VB.Net Asynchronous background worker inside a loop.

Im using Vb.net visual studio 2008. i have got a process(system.diagnostics.process) to be run in background and it updates the Ui thread progressbar and a label and i have worked it using backgroundworker.runworkerAsync. Now the problem is i have to work the same process for a number of time with different inputs. The code block is : ...

WCF client returns "nothing" as a response to a third party webservice

I have a 3rd party webservice (happens to be a peoplesoft EIP service) that I'm trying to call from .net. I've tried using a service reference and the old web reference to call this service and every time I call it I get a response of "nothing" back from the service. I've ran the service call through SoapUI and it works fine. I've capt...

Getting User Count From IRC

I am making IRC chat client and I am wanting to grab the user list or simply the user count, how can I go about doing this. This is the method I'm using to connect to the IRC: Private Sub IRCConnect() Dim stream As NetworkStream Dim irc As TcpClient Dim reader As StreamReader Try irc = New Tcp...

how to trim a Byte() in VB.net

I am trying to use socket to transfer byte to client. I define Byte(1024) because I am not sure how many character is the server sending! I don't know how many index of this array has been occupied!? ...

String format and replace

I want to change userId to ****. I want to count length of a userId and change the string to that many asterisks. I also want to take the account number and replace all characters except the last 4 XXXX. How do I do these things? ...

What should I be aware of when using session variables?

Hi, I'm planning to use some session variables on an intranet ASP/VB.NET page, and want to make sure that I'm not missing out on anything important I should know, or that I have my information mixed up. So here's what I (think) I know about session variables. They: are stored on the server, so if I have a lot of users then they'll ea...

Saving class library user settings in winforms .Net 3.5 SP1

A while back, I wrote my own settings provider because I was having problems persisting settings in a class library. (Note - I had no problems persisting settings from an application). Today, I just did a test of persisting class library settings and it worked, without my custom provider. The test is: (1) Create a class library (2) Add...

How do I add HTML to a ListItem in ASP/VB.net?

If I use this code on my aspx page: <asp:BulletedList ID="listClientContacts" runat="server"> <asp:ListItem><b>My Name</b></asp:ListItem> </asp:BulletedList> The text renders as literal <b>My Name</b> instead of making the text bold. The same thing happens if I try to add a list item from the VB side of things: Dim li As ListIt...

Cannot bind to the property or column on the DataSource. Parameter name: dataMember

Hello, I am getting a rather annoying problem when trying to programmatically assign a binding source to a table adapter. The error message I am getting on form load is "Cannot bind to the property or column LocaleServiced on the DataSource. Parameter name: dataMember". I am hoping its just something stupid that I haven't been able to ...

Error when removing a substring

Feeling dumb, I'm trying to remove a sub string after the last occurrence of a ".". The code is as follows: Dim dotIndex As Integer = fileNameCopy.LastIndexOf(".") Dim dummy As Integer = fileNameCopy.Length - 1 fileNameCopy = fileNameCopy.Remove(dotIndex, dummy) When I debug, I get an argument out of range exc...

Detecting the form move event from within a child control

I am creating a user control where when a user clicks a button a popup window will show up with information. The popup window is driven by a toolStripDropDown so when it shows up it does 2 things Does not move the other controls on the form around but displays over them That it can show the details outside the bounds of the user cont...