collecting data from checkboxlist - asp.net

Pretty basic question, I have a checkboxlist inside of a wizard control. I need to collect the value of all items that are checked, as well as whatever value is inside of a textbox if "other" is checked, to insert into my database during the Wizard.FinishButtonClick event. How do I do this? I need this in VB, please.

We cannot give you complete code to implement the task you want to implement, but can provide some starting point. Please go through the articles given below. Get back to us if you still have problems in implementing what you want after reading these.
Wizard control in .net
Asp.net and Vb.net wizard
Wizard control
I found all these in a simple google search.

Related

Dynamic DropDownList City,State in ASP.NET (VB)

I have two dropdownlists, the first is State & the second is City. I have the State ddl populated, but I would like to populate the City ddl via the selection in the State ddl. I am using autoPostBack, so it goes through the motion of updating but nothing loads. I am sure it is in the code behind or in the databind. This operation seems simple enough, if anyone has any info or a good link on a way to accomplish this, it would be greatly appreciated.
Also, after the State & city are selected I have a select button that will send the user to a gridview page with all data. That part of the page I have working and tested. It is getting the data to pass that is the issue.
I am using Stored Procs, is there a easier way to accomplish this?
Thanks in advance.
This is very simple to do and there are plenty of articles out there with full source code.
http://csharpdotnetfreak.blogspot.com/2009/03/populate-dropdown-based-selection-other.html
If you want to use the Ajax Control Toolkit, there's even a control just for that.
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/CascadingDropDown/CascadingDropDown.aspx
and there are plenty of other examples using the following Bing search:
http://www.bing.com/search?q=asp.net+cascading+dropdown&form=CMDTDF&pc=CMDTDF&src=IE-SearchBox

Custom Data-bound control help

I have never done this before and am very beginner in this one, so please treat me that way and help me. Obviously this is a complex topic for me at this stage.
I need to develop a custom data-bound control which will contain, few text-boxes, drop-down lists, labels, and other standard web-server controls. And, I want to be able to load this control from a web page on button click. When the user enters any data to any of its child controls, i should be able to save, and also retrieve when the data-bound control is loaded again. Also, the data in the child control should retain their value on postback.
Can someone help me getting into building this? What approach should i follow? Any books or artilces matching my requirement will be really helpful which i can read and help me develop this.
Here is an example of a custom data bound control: http://msdn.microsoft.com/en-us/library/ms366540.aspx
Just out of curiosity, using a FormView or DetailsView control wouldn't solve the problem you are experiencing? It has to be a custom control?

thoughts on asp.net grid controls

All, I am creating a web application and I need to give users the ability to add/edit/delete records in a grid type control. I can't use 3rd party controls so I am restricted to just whats in the box for asp.net (datagrid or gridview) or creating my own. Any thoughts on the best direction to go in. I'd like to keep the complexity level at a dull roar :)
thanks in advance
daniel
You should definitely use edit and insert templates. All you have to do is give the button/link the command name such as insert/delete/update and you can allow the Grid to do most of all the work.
Check out this link
I think you'll learn to love the gridviews because they are pretty powerful.
Gridviews have different item templates that you can use for editing and inserting data. That'd be an easy way to go about it.
As long as you set your datakeyid property to the primary key in the database, you should be able to make template fields based off of whether or not you're editing or inserting data. The command name of the button you use to fire the event will handle the statements required for updating/inserting data.
This is a good site for some examples.
the out of the box grid is not too bad.
Here are a few links on master detail records in asp.net this should get you started on the CRUD opperations.
http://www.exforsys.com/tutorials/asp.net-2.0/displaying-master-detail-data-on-the-same-page.html http://msdn.microsoft.com/en-us/library/aa581796.aspx
http://www.bing.com/search?q=asp.net+master+detail
this is the best site for what you are after
www.Asp.Net
Data Access Tutorials controls
Master/Detail Using a Selectable
Master GridView with a Details
DetailView
Using TemplateFields in the GridView
Control
Others
Beginners Guide to the GridView
Control
The GridView Control
IN-DEPTH LOOK AT THE GRIDVIEW CONTROL

Is custom paging of GridView (in ASP.NET, preferably 3.5) possible without using ObjectDataSource?

See title.
Using ObjectDataSource is associated in my mind with quick demos that you can see at conferences and in video tutorials (which typically tells me "don't do it this way in production").
Also I always like to have control over what's going on and when it happens. My other problem with ObjectDataSource is that is's declarative.
Looking forward for your help and opinions.
UPDATE:
I'm retrieving only one page of results from the database and the GridView.PageCount is read-only [sic!].
Yes, you need to define an PageIndexChanged event handler to perform the actual paging of data from your source before binding to the Data Grid, same idea for sorting but with a SortCommand handler.

visual studio team suite : How to web test programmatically?

Good day,
I'm new to Visual Studio 2005 Team Suite web testing. Here's the action i'm trying to achieve.
On a webpage, I have a dropdownlist that is populated from a simple database table. In my tests, I want to click on each items of the dynamically populated dropdownlist, and after the postback, check if a label is visible on the page, which depends of the selected item in the dropdownlist.
However, since the dropdownlist is dynamically generated, I cannot simply 'record' and manually click on each item of the dropdownlist, so I have to code the test.
I'm pretty sure this is really simple to achieve, so I was wondering if there is a good free tutorial on web testing that I could use.
Thank you very much!
You question.
However, since the dropdownlist is
dynamically generated, I cannot simply
'record' and manually click on each
item of the dropdownlist, so I have to
code the test.
It seems to me that you need add "Data Binding" to your test.
Please read through this MSDN article.
HTH.
As long as it is fairly standard web-form postbacks you can use NUnitAsp:
http://nunitasp.sourceforge.net/
Here is a decent article on it here:
ServerSide NUnitASP
NUnitAsp is no longer really active or supported, but it still works good enough for simple form testing.

Resources