new to .net, need help setting db values from checkbox's then retrieving value to a label control

Hi,

Being new to asp.net i know this possible i just can't quite get it right! 

I need a page with 5 checkbox's that when submitted sets the bit values in DB fields to checked.
Then i need another page that retrieves the records of the checkboxes, but instead of having the db pre-set checkboxes on the second page i want it to turn on label web controls depending on if the check box is set..

I hope that makes sense?!! Can anyone point me in the right direction or to a suitable tutorial?

Thanks in advance

Ben

0
ben21
5/23/2005 4:47:13 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
1329 Views

Similar Articles

[PageSpeed] 37

Excellent article here.
http://www.heliosfx.com
0
mxmissile
5/23/2005 8:47:43 PM
Reply:

Similar Artilces:

Can a User Control's Page_Load retrieve a value set in the parent's Page_Load?
I want to use a control to perform a specific task, but I want it to vary based on the page it is on. I was hoping to set a value in the Page_Load event of the Parent, and have that value retrieved by the Page_Load event of the user control. I am not sure what order these events fire in, Can I be certain that the parent event will fire first?...

cascading dropdown set it's value only once but not on subsequent postbacks,web service recieve the value but can't set in dropdown
i have a dropdown named uxcommunity which is a dropdown and contain text in format ##-####-#### . and 2 more dropdowns province and district where province filters district. i get the first 2 characters ##  for session("province") and #### for session("District") and i have button to do the postback. first when the form loads and i click the button it get the value and select appropraite items in to dropdown province and district. but when i change the province dropdown content and district dropdown content and click the button , session will take correct...

Retrieving values from a variables used in 'Windows Form Controls' embedded into a Web Application
Hello to All,  Is there anyway I can capture values from text labels and datarow from the global variables defined within the 'windows control'  and access it on my web application on which the windows control is embedded? Also, I would be grateful if someone can have a look at my other problem posted on the following thread: http://forums.asp.net/t/1167917.aspx   Thanks Umer ...

Viewstate : Comparing a controls previous value to it's new value
I'd like to compare the original values of a pages web controls to their new values upon postback. The problem is I can't seem to get any values from viewstate. for example some psudocode; sub pageinit() myVar = cint(viewstate("dropdownListcontrolID")) myvar2 = cint(viewstate("textBoxControLID")) end sub This doesn't error out, but all values = 1, which cannot be the case. I must be missing something. Viewstate seems like the most logical place to look for the controls previous values. Or do you recommend I do it a different way? ...

Value of type 'System.Net.Mail.MailMessage' cannot be converted to 'System.Net.Mail.AlternateView'
Trying to create an alternateview to send a txt email with the html formatted email.  I've used string builder to create the whole email, but I get this error.  Any ideas why?  i've bolded the line that throws the error... Dim EmailBodyTxt As New StringBuilder EmailBodyTxt.Append("<html><style type='text/css'>.table{border:solid; border-color:#006666; width:600;} ")EmailBodyTxt.Append("<body><table class='table'><tr><td colspan='2'><h1>Test<br />RESPONSE SYSTEM</h1></td>...

Help! I cannot access the DataGrid's ItemTemplate's LinkButton's Text Atrribute 's Value!!!!!!!!!!!
I write a datagrid's ItemDataBound method as follows:   private void dgTable_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)  {   if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)   {    if(!isRole("Manager"))    {     LinkButton tmp = (LinkButton)e.Item.FindControl("lbPassed");     if(tmp.Text == "Passed")     {      ((LinkBu...

BC30311: Value of type 'Control' cannot be converted to 'System.Web.UI.WebControls.CheckBox'
 Hi, can somebody help me on this problem. It works at first, but all of a sudden, it fails, and I can't find out why.    1 Sub btnSave_Click(ByVal sender As Object, ByVal e As EventArgs) 2 3 If Not CheckRequiredField() Then 4 MessageBox("Please complete the input data!") 5 Exit Sub 6 End If 7 8 Dim nRow As Integer 9 Dim Ctrl As Control 10 Dim chkDelete As Object 11 Dim LookupID, Name, Desc, Type As String 12 13 nRow = 0 14 1...

How to make the form View save it's field values in Visual Stdio .NET
Hi every one .this's my first post in this forum ,hope you can help me ..i have this problem ,i have a form View that i use to insert data into a data base ,the thing is: i want the text values inserted in the Text Fields in the Insert Template in The Form View to be saved ,meaning that when the insert operation completes these text field still contain the text values that was inserted in ..note : i tryed to enable the view State in those TextBoxes but that didn't work ..  I think it's about SqlDataSource Refreshing  the FormView or Some thing like that ,but i don'...

Net::LDAP::Control returns 'ASN' value?
Hello, I've got a question about the behavior of Net::LDAP::Control and it's child classes. =20 Should a call to $control->value() return an ASN value? I instantiated a few controls to see their behavior and they are all the same. They return an ASN value. I guess I expected the original, untainted, value to be returned. (The value of Net::LDAP::Control->value() is untouched but I suspect that is because it is a simplified stub for subclasses.) Thanks, -David Faltermier david.faltermier@hp.com #--------------------------------------- # Testing Net::LDAP:...

How can I use c# 's project web server control on a vb.net project....Help Please
Hi       I am using a server control in a C# project in an aspx file. It works fine when I use that in that same c# project. But when I import the assembly into a vb project and place the control on the page. Its giving me a System.NullReferenceException: Object reference not set to an instance of an object. error message. Please help me with it, I cant even debug it as soon as I land on the aspx page this error appears. Please help me in getting through with this message. I have spend two days working on it. Its giving me an error message on this line this.t...

Label control's text doesn't appear to be set (in the page which has a user control )when trying to update the text property in the FormView's ItemUpdated event
Hi There,I have a user control which hosts a formview control, gridview control and a label control. The grid view is usedto show rows in the DB and when clicked to edit each row, a form view opens up in edit mode with that particular row info. So I have nothing in the item template.My first question is..is it mandatory to have smth in the itemtemplate of the form view.I have controls in edititemtemplate and insertitemtemplate.When a particular row is edited, I would like to show a status msg showing that the row has been updated.For this, I use the ItemUpdated event of the formview and try ...

Value of type 'System.Web.UI.Control' cannot be converted to 'System.Web.SiteMap'.
 Hello,         I receive this error "System.Web.UI.Control' cannot be converted to 'System.Web.SiteMap" when I try to find the Sitemap control.  ...            <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />            <asp:ListView ID="ListView1" runat="server">            <LayoutTemplate>    ...

Setting the Parameter Value to the Property Value of a Web Control
I want to filter my DetailsView with a declarative parameter. In my case, I am setting the SqlDataSource's parameter values based on the value of 2 TextBox controls on the page. I have a SP that does a SELECT based on 1 of the parameters passed in (either an ID or phone number). Param Name          Value MemberID          TextBox1.Text Phone               TextBox2.Text I want to assign a default value of 'null' for b...

Want to set TextBoxs' value that's inside FormView
Hi,   I have a FormView with DefaultMode as "Edit". I want to set one of its TextBox's value programmatically. I am trying something like this on the Page_Load event of the page -   Dim tb As TextBox = DirectCast(FormView1.FindControl("txtDomainId"), TextBox) tb.Text = Request.Querystring("Domain")  It throws me a an error saying - Object reference not set to an instance of an object. Any clue what's wrong here. Please help. Thanks guys for your inputs. why not do this? <asp:Textbox ID="Textbox1" runat="server" Text='<%= Request("QSname") %>' />&...

Web resources about - new to .net, need help setting db values from checkbox's then retrieving value to a label control - asp.net.web-forms

Resources last updated: 1/15/2016 7:35:58 AM