VS 2008 : Linq / Sql Advice On Using Dropdown Checklist Usercontrol Values?

Apr 16, 2011

I had actually getting LINQ to work but I am past that now but I was wandering if anyone could help me what I basically have is a DropDownChecklist user control I made and the contents of the list are filled by LINQ getting a list of company names see below:

'Population for company filter box
Public Function GetCompNames()
Using DC As New DataClassDataContext
Dim comp = (From C In DC.Companies _

[code]....

Would you suggest using a public array or something to store the companyID's when populating the first list box? This just came to me at the end of writing this post. Will try this but not sure if its the right thing to do.

View 1 Replies


ADVERTISEMENT

Linq - Database Advice Needed: Porting VB6/ADO/JET App?

Jul 22, 2010

I need to update (well, rewrite really) a SMALL VB6 application which uses ADO to access a JET database, to a vb.net app in Visual Studio 2008. My research suggests that I should use LINQ, but it doesn't seem to be possible to connect to JET. If JET is now deprecated, what should I use? Or should I use ADO.NET without LINQ?

Please don't answer SQL Server! - this needs to be an app that end users can install easily in corporate or non-corporate environments, and must not require any ongoing technical maintenance. I started to install SQL Express, but stopped when it required at least 2 system updates, as that will be far too complex for this little app.

View 4 Replies

Make Values In Second Dropdown Depend On The Selection In The First Dropdown

Sep 3, 2009

I have a list of servers in the first dropdown. I want to get list of all databases in the second dropdown depending on the server selected in the first dropdown.

For this I need to query each server while selecting the server.

View 1 Replies

Dropdown In UserControl - Event Is Not Raised

Jan 11, 2012

I have a user control named "LettersDropControl". It has a dropdown list. I am using this control in a aspx page. When I change the selected item it is not calling the ddlLetters_SelectedIndexChanged event handler? What change I need to make in order to execute the code in ddlLetters_SelectedIndexChanged event handler?

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LettersDropControl.ascx.cs" Inherits="MSAJAX1.LettersDropControl" %>
public partial class LettersDropControl : System.Web.UI.UserControl {
private string selectedLetter;
public string SelectedLetter {
[Code] .....

View 1 Replies

VS 2008 - Comparing Values Of Dropdown With String

Jul 10, 2009

I am making a app that reads options of a ini
dim config as new iniconfigsource("patch.ini")
dim test as string = config.configs("news").getstring("test")
Then I made a dropdown with options

I want my script to compare the values of the dropdown with the string readed from the ini
then uses it as selected value (the so called standard value) the one uc without clicking on the arrow if the none of the values match with the string value of the ini then it executes
dropdown1.selectedindex = 0

View 4 Replies

VS 2008 - Linq Statement To Go Through A Dropdown Menu's Sub Items And Get What Items Are Checked

Apr 8, 2010

I have the following linq statement to go through a dropdown menu's sub items and get what items are checked: vb Dim UnselectedItems = From xItem As ToolStripMenuItem In tsiSelectObjects.DropDownItems Where TypeOf xItem Is ToolStripMenuItem AndAlso CType(xItem, ToolStripMenuItem).Checked = False

I get this error tho: Unable to cast object of type 'System.Windows.Forms.ToolStripSeparator' to type 'System.Windows.Forms.ToolStripMenuItem'. As you can probably guess i have ToolStripMenuItems and separators in there

However the AndAlso should short circuit in the case where the item is not a ToolStripMenuItem and it doesn't seem to be doing so (as TypeOf xItem Is ToolStripMenuItem=false in this case)?

View 2 Replies

VS 2008 Tell If User Checked A Box In The CheckList Box?

Oct 19, 2009

how would i tell if user checked a box in the CheckList Box? Im going to have alot so i need to keep it neet and tidy so it looks clean.

View 3 Replies

Fetching Values For Usercontrol?

Mar 29, 2010

I've created an user control in VB.Net. My requirement is to make this user control read values from a form .say for eg. read a filename which will be provided from app.config.

View 1 Replies

IDE :: Add Values To Dropdown List?

Mar 7, 2011

how to do this Also the drop down list in web service..

View 5 Replies

Asp.net - Dropdown List Values Repeating?

Jun 29, 2011

I am using dropdown list values Bound from data base my code

Public Function get_type() As String
'get type
If IsPostBack = False Then

[Code]......

View 3 Replies

Values From Database To Dropdown List?

Oct 4, 2009

I want to retrieve value from database.........I have a sql table with (Username [Primary Key] , Friends, dob, contact ) columns; table name is MyFriends

Now Code is......
string qry = "select Friends from MyFriends where UserName='hrs'";
da = new SqlDataAdapter(qry, connection);

[code]....

View 1 Replies

Xml - Mix Values From Local Data With Values Returned From Database While Using LINQ To SQL?

Oct 27, 2010

I am creating an xml file with LINQ as follows...

Public Sub CreateXml()
Dim db As New MDataContext
Dim Customers = <gallery columns="3" rows="3">

[code]....

Could i mix local values with the ones returned from the LINQ query...Something like the following?

Public Sub CreateXml(ByVal **Col** As String, ByVal **Row** As String)
Dim db As New MDataContext
Dim Customers = <gallery columns="& **Col** &" rows="& **Row** &">

[code]...

View 1 Replies

Programmatically Setting Property Values In A Usercontrol?

Nov 12, 2009

I am programatically creating instance of usercontrol as shown below

[code]...

I have two public properties in my usercontorl like clerkName and RespName. How can I set those values in the above code. Intellisense is not showing ClerkName and respName Properties.

View 1 Replies

Custom Control Property With DropDown Values

Jun 21, 2010

I have a custom control. I need to add a property, say, Comparison, to the control. The property should be set at design time using a dropdown. The Dropdown will have String values like '=','>','<' etc.
I tried using Enum values and working perfectly but I need to do some extra coding to convert the Enum values to the string I required. It would be great if I can get the values from the dropdown so that I can directly use the selcted value.

View 2 Replies

Use The Selected Dropdown Values To Determine A Query?

Apr 2, 2012

I am having trouble using the values that were selected from the dropdown list. How would you reccommend passing the selected values from the view?Ideally, we want to use the selected dropdown values to determine a query.

View 1 Replies

C# - Create Controls Dynamically Based On Dropdown Values?

Jun 12, 2012

I need to create a sample question types web form in VB.NET which allow user to the following:he user selects the control type from dropdown (TextBox, RadioButton, ListBox etc). Generate controls dynamically based on the control type on the webform.It will always show the TextBox (where user writes the question) and (generated control - TextBox, RadioButton, ListBox etc) and save those values to the database.

View 3 Replies

Chart Setup - Dynamically Changing Values Via Dropdown

Mar 7, 2011

How to set up a Chart using the new MS Chart control. I want to be able to populate the data via SQL because the user will be able to dynamically change the values via drop downs. The format of the data will be the same (Qty, Time Period) but the Focus of that data will change. I'm honestly not sure where to start, I can draw the chart but I have no idea how to populate it with data via code so it can be changed dynamically.
VBE 2010, and I'm hitting an AccessDB

View 2 Replies

Forms :: Dropdown Menu With Values For Displaying Different Tables

May 25, 2009

I want to have a drop down menu with the values:
Year 7
Year 8
Year 9
And I want to display different tables for each the values selected in the drop down menu. For example, when the "Year 7" value is selected in the drop down menu, a table is displayed for that year.

View 3 Replies

Reference The Values From Textboxes On Form Submit That Reside In Usercontrol?

Aug 18, 2011

I have a large form that reuses several elements, so I decided to create a usercontrol with some common fields. The problem is when the form is filled out by a user and submitted, how do I reference those values so I can input them to my database???

Example:

Using Conn As New SqlConnection(connect)
Using Cmd As New SqlCommand(SQL, Conn)
Cmd.Parameters.AddWithValue("@Acct_Company", txtPartner.Text)
Cmd.Parameters.AddWithValue("@Acct_AccountNum", txtPartnerAccount.Text)

So, above two Cmd lines are for normally inserted textboxes in my form, but what would the line look like to reference any usercontrol form fields?

View 1 Replies

Asp.net - Add Values In 2nd Dropdown List After Checking That Selective Index Of 1st Frop Down In .net?

Dec 26, 2011

Basically I have a form which has 2 drop downs. In the 1st drop down I am selecting City category. When the city is selected I want to update the 2nd drop down values in correspondence to 1st value choosen in 1st drop down. I have done like this,This adds the value in the 1st Drop Down:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim s As String = "connection String"
sqlconn = New SqlConnection(s)

[code]....

View 2 Replies

Mix And Match Discount Code Advice

Jul 20, 2010

I need advice on how to implement. I have two objects ReceiptLine and Discount. Cashier scans item and a receiptline object is added. If the added ReceiptLine object have a Discount Id then, it has to lookup in Discount object and issues discount after validation. I have problem in validation. [code]

View 2 Replies

Create A Dropdown List Of Valid Property Values For A Custom Control

Jan 8, 2010

I've created a custom user control that has several properties. One specifies which database I want the control to access. I want to be able to present the user of the control a drop down from which he can select which database the control will interact with. How do I get the dropdown to work? I can get default values, but have yet to figure out how to get the selectable list.

View 4 Replies

VS 2010 Shuffle Up And Deal Program Would Like Advice?

Nov 10, 2011

I have handed this assignment in and it works albeit not in the most elegant way. I am taking my second programming class ever and I would love for some feedback and answers to a few questions i have. First, what would be a better way to display the correct image to the corresponding card. Using all those if statements seems ridiculous, but i cant see a way around having card 1 possibly equal each value from every suit, card 2 equal each value from every suit, etc.

Second, my professor wants us to be able to record the seed value so that we could then plug it back in and return the hand that was shown when it was created. i have done this but I am a bit confused. The seed shows up as a value from 0-999, but when you use the combination formula to figure the total possible amount of hands you get over 2.5 million. Since i only have 1000 seed values does that mean that multiple hands might share the same seed value or does that number (0-999) mean something different eache time? Sorry if my explaination seems confusing.

Third, I am always looking for advice on better ways to do things. If anyone has free time and would like to offer constructive critisism I would be grateful.Below is the code. I only left in picturebox display for 1 suit so as to shorten the total amount shown. I also removed code for other buttons and stuff.

Public Class Form1
Private Sub btnShuffle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShuffle.Click
' Variable Declarations
Dim intSuit As Integer ' Row
Dim intCardValue As Integer ' Column

[Code]...

View 4 Replies

Web Service On Web Server For Local Application Advice?

May 15, 2009

i am looking into web services to be used for a windows forms application that i want to connect to my website and return data from my database. One thing i am concerned about is security. I have only played with web service a little bit but it seems to allow direct access to it by url and then run the service, showing the results in the browser. i guess i could set it up to accept a password in the code. i guess really if i have to pass in the query criteria to the sql from the application then showing the records in a browser should not be a problem. in my web application for the site i can keep all my web services in the app_data folder for no browser access.

i just need some advice in this area. goods, bads, other options if better. i don't have a full grasp on working this way from a client side windows application.

View 9 Replies

Getting The Checklist Box?

May 25, 2011

i have got a checklist box and i have bind it with value like menstioned below

Dim strquery As String = "SELECT Pk_ProcessID,Fk_ClientID,ProcessName,mc.ClientName FROM M_Process mp JOIN M_Clients mc ON mp.Fk_ClientID = mc.Pk_ClientID ORDER BY mp.Pk_ProcessID"
cnn = New SqlClient.SqlConnection(strConnect)

[code]....

View 1 Replies

Add Data To Checklist Box On Runtime?

Aug 25, 2009

I have data in an arraylist and i want to add data to checklist box on runtime and i also want to display a textbox besides it so that i get the comments

example :
checklistbox "text" textbox
checklistbox "text" textbox
checklistbox "text" textbox
checklistbox "text" textbox
checklistbox "text" textbox

View 3 Replies

Arranging The Checklist Order?

Aug 8, 2009

i am currently doing a checkboxlist that is retrieved from database. is there any way where i can sort the checklist items in a way like those checked itmes will be displayed at the back then those that are not checked will be moved to the top.

View 4 Replies

Skills Checklist For Students?

Oct 24, 2009

For the assignment that I'm doing, there's certain skills I must demonstrate in my assignment. There are some standard ones, and some optional ones. The more optional ones I have, the better chance I have at achieving an A.Problem is, some of the things on the list are a bit wierd, and after Googling them, I still have no idea what they are. I will list them, if you could perhaps tell me what they are and how they work anInput Mask (Actually, I know what this is - when people input information, it's a method that inserts in the information in the correct frormat (eg. dd/mm/yyyy) but how do you do use this in Visual Basic?Use of procedures or modules

Optional
Validation rule andappropriate validation text message
Validating data input entry (eg data type, appropriate value, required)

[code].....

View 19 Replies

C# :: Call Function From UserControl On ASPX From UserControl On MasterPage?

Jan 31, 2011

I have MainLayout.master that has UC_Menu.ascx on it. I have a page named Customer.aspx that uses MainLayout.master. Customer.aspx also contains a UserControl named UC_Details.ascx.How can I have UC_Menu.ascx call a function that is in UC_Details.ascx with this scenario?

View 3 Replies

Deleting Directories Using A Dynamic Checklist?

Mar 19, 2009

I am developing a .Net application that populates a checklist by querying the directories inside a "base" directory (this part already accomplished). The purpose is to show these directories and allow the user to "check off" the directories they want to delete, and then click a button to delete just those directories (this is the part I'm stuck at).My checklist populates, but how would I go about deleting just the directories that get checked?There is one more thing. Each of these directories might have a log file (of the same name) inside the "base" directory; this corresponding log file should also be removed.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved