I'm new to Linq, what's the syntax for orderby in VB?
Dim cxt As New datContext
Dim qry = (From lst In cxt.zipcodes _
Select lst.state).Distinct
qry = qry.OrderBy()
my simple sql statement will be like this:
Select distinct state from zipcodes
order by State
...
Hi there,
I currently have a website and upon registration to the website i generate each member a unique GUID. Upon the user logging in to the website i check the credentials and store the guid in session if successful, in order to show the user there profile / how many post have been made etc i run my queries to the database passing t...
C# and VB.NET comes with built in types that maps to the CLR types. Examples are: int (C#) and Integer (VB) maps to System.Int32, long (C#) and Long (VB) maps to System.Int64. What are the best practices for deciding when to use built in types or not to use them (using the System.* structs/classes instead)?
...
Using the .net 3.5 framework and C# I'm trying to add a new user to AD from C# and can't find any examples. I see that the PrincipalCollection object has an overloaded 'add' method but can't seem to figure out how it works. Can anyone help?
How create a new user object, add it into AD.
Secondly, the user that will be adding in new...
How can I either create a new website or add a host header to an existing IIS 7 server from code?
I have looked and have not been able to find a working example?
...
Assume you have controls A, B, C, D and E all with a Visibility property. You also have states 1,2,3,4,5 and 6 in which various combinations of your controls would be displayed.
Currently this is being handled by switch statements for each state: i.e.
Select Case PageState
case "1"
a.visible = false
b.visible = true
...
I've tried changing the RowStyle Wrap property and every Wrap property in the grid. How do I stop word wrap in a Gridview no matter what size the Row's Text Length is?
...
I've created a VB.Net ClassLibrary with a UserControl in it. I can load it from an HTML page and call the methods that I created. This works as expected. I've tried several examples for how to raise an event from the VB code to the js caller, and none of them seem to work (I'm using IE7).
What I'm doing:
Public Class ctrlABC
Public ...
I am attempting to create a long range calendar that dynamically loads (and unloads) event data as the user scrolls left or right through time. I'm really struggling to figure out how to lay the basic framework of the UI out and how to dynamically build the interface as the user scrolls by clicking and dragging the mouse in the view area...
I have some Label controls sitting on Panel controls on a Form. I want to get the labels' positions relative to the form's origin so that at run time I can hide the panel and the labels and draw some other text in their place directly onto the form.
Basically, I'm doing the following calculation: Get the absolute screen position of a la...
Whats the best way to go through all the controls on a form in vb2005?
Im writing a program that can edit a string of bytes based on the information on the form.
each control is tagged with the hex address it modifies and values it can be, what is the best way to go through all the controls on a form even those controls embedded in other...
If I have an ObjectDataSource setup like:
<asp:ObjectDataSource
ID="ObjectDataSource1"
runat="server"
DataObjectTypeName="Employee"
InsertMethod="Insert"
UpdateMethod="Update"
DeleteMethod="Select"
TypeName="EmployeeDB">
</asp:ObjectDataSource>
and a data/business object with methods like:
public clas...
The way this file works is there is a null buffer, then a user check sum then a byte that gives you the user name letter count, then a byte for how many bytes to skip to the next user and a byte for which user file the user keeps their settings in.
the loop with the usersm variable in the IF statement sets up the whole file stream for ...
Hi guys, How you doing today? Wish you all good.
By the way, here is my problem. I would like to display the total of sum duration in gridview by using LINQ to SQL. I have two tables, Users and Log_Times
Users
UserID-----Name
1------------Bob
2------------Mary
3------------Jane
Log_Times
ID---------------UserID--------------------Time...
How would I display an Icon at 48x48 resolution on a form in vb.net?
I looked at using imagelist , but I don't know how to display the image that I add to the list using code and how to specify it's coordinates on the form.
I did some google searching but none of the examples really show what I need to know.
...
Hi,
I've overriden the WndProc of the ComboBox and I am drawing my own combo box, a code snippet is below:
Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc(m)
Select Case m.Msg
Case &HF
Dim g As Graphics = Me.CreateGraphics
If ComboBoxRenderer.IsSupported Then
...
Hi,
Can anyone explain to me how to create a uninstall command for a Windows-based application in the Application Folder when creating a new setup project in visual studio 2008.
I've found info on the net but nothing helping me so far. If you could supply me with links or instructions it would be great.
Thanks.
...
When working with a collection of forms that the user must step through, is it better to pass the data foward when creating a new instance of that form, or is it better to call a function from the previous form? I have some code written that calls the previous routine, and it looks ugly, and I can't quite think of a reason why it was don...
I currently in British summer time which is UTC +1 Hour. I confirmed my PC is correct with the following code and it returns true.
System.TimeZone.CurrentTimeZone.IsDaylightSavingTime(Date.Now)
My question is then why does the UTC formatter not work as I would expect:
DateTime.Now.ToString("u")
It returns the exact current system d...
how would you convert this code into vb.net since vb doesn't have the yield keyword
thanks
public IEnumerable<RuleViolation> GetRuleViolations() {
if (String.IsNullOrEmpty(Title))
yield return new RuleViolation("Title required", "Title");
if (String.IsNullOrEmpty(Description))
yield return new RuleViolation("Des...