Click here to Skip to main content
12,453,873 members (57,392 online)
   

ASP.NET

 
QuestionPaypal Website Payments Standard Integration using NVP Pin
Zaf Khan22-Nov-12 18:21
memberZaf Khan22-Nov-12 18:21 
AnswerRe: Paypal Website Payments Standard Integration using NVP Pin
jkirkerx24-Nov-12 19:59
memberjkirkerx24-Nov-12 19:59 
GeneralRe: Paypal Website Payments Standard Integration using NVP Pin
Zaf Khan24-Nov-12 22:07
memberZaf Khan24-Nov-12 22:07 
GeneralRe: Paypal Website Payments Standard Integration using NVP Pin
jkirkerx25-Nov-12 8:08
memberjkirkerx25-Nov-12 8:08 
GeneralRe: Paypal Website Payments Standard Integration using NVP Pin
Zaf Khan25-Nov-12 19:44
memberZaf Khan25-Nov-12 19:44 
QuestionProblem With List View Pin
ggaurav bhandari22-Nov-12 2:09
memberggaurav bhandari22-Nov-12 2:09 
AnswerRe: Problem With List View Pin
Parwej Ahamad22-Nov-12 6:08
memberParwej Ahamad22-Nov-12 6:08 
GeneralRe: Problem With List View Pin
d0cvb22-Nov-12 10:28
memberd0cvb22-Nov-12 10:28 
GeneralRe: Problem With List View Pin
Parwej Ahamad22-Nov-12 18:35
memberParwej Ahamad22-Nov-12 18:35 
QuestionChecking the size of a cookie Pin
suzyb22-Nov-12 1:46
membersuzyb22-Nov-12 1:46 
AnswerRe: Checking the size of a cookie Pin
Zaf Khan23-Nov-12 6:04
memberZaf Khan23-Nov-12 6:04 
GeneralRe: Checking the size of a cookie Pin
suzyb23-Nov-12 9:49
membersuzyb23-Nov-12 9:49 
GeneralRe: Checking the size of a cookie Pin
Zaf Khan23-Nov-12 11:43
memberZaf Khan23-Nov-12 11:43 
QuestionRemove tick/check box from ASP.NET Checkbox control Pin
thes@int21-Nov-12 6:48
memberthes@int21-Nov-12 6:48 
Hello guys !

I have this CheckBoxList control and to each ListItem of it, have set the Text property to the img HTML tag so it displays an image.

I am trying to remove the tick/check box from the checkboxes of a ASP.NET CheckBoxList control when i click on each item.

My code does this. Every time i click on some check box, the **SelectedIndexChanged** event fires up and it does some saving of some data in my database. And when the saving is done and the page is refreshed i want to check/tick box of the checkbox item that was clicked not to be there anymore and the checkbox to be disabled cause i don't want the user to able able to click it again. I have tried to tried to set the Enable and Selected properties to False, and also add an attribute to the CheckboxList control, but without success. Here is my code.


<asp:CheckBoxList ID="Services" runat="server" RepeatColumns="5" CellPadding="10"             
    CellSpacing="15" RepeatLayout="Table" 
                             Font-Size="Large" RepeatDirection="Vertical" TextAlign="Right" 
    AutoPostBack="true" EnableViewState="true">
 
    <asp:ListItem Value="Facebook" Text="<img src='/ServiceIcons/facebook.png'  
    title='Facebook' />" />
    <asp:ListItem Value="Googleplus" Text="<img src='/ServiceIcons/googleplus.png' 
    title='Google+' />" />
    <asp:ListItem Value="LinkedIn" Text="<img src='/ServiceIcons/linkedin.png' 
    title='LinkedIn' />" />
    <asp:ListItem Value="RSS" Text="<img src='/ServiceIcons/rss.png' title='RSS' />" />
    <asp:ListItem Value="Skype" Text="<img src='/ServiceIcons/skype.png' title='Skype' />" 
    />
                
    </asp:CheckBoxList>


And in the code behind i do this:

Private Sub Services_SelectedIndexChanged(ByVal sender As Object, ByVal e As 
      System.EventArgs) Handles Services.SelectedIndexChanged
        
           -----Storing to database code here------
 
            Services.Items(Services.SelectedIndex).Enabled = False
            Services.Items(Services.SelectedIndex).Attributes.Add("class", 
            "displayCheckBox")
            Services.Items(Services.SelectedIndex).Selected = False
        
 
      End Sub

And the css class here:

.displayCheckBox input{background:Green;}

After the the event does the storing in the databse, page refreshed the checkbox that was selected is disabled but it shows the tick/check box, and i don't want it to show it if is selected.

Any one has an idea. I have searched a lot, but it seems that the CheckBoxList control doesn't provide much costumizing options.

Thank you in advance !
AnswerRe: Remove tick/check box from ASP.NET Checkbox control Pin
jkirkerx21-Nov-12 12:46
memberjkirkerx21-Nov-12 12:46 
Questionweb service creation Pin
Member 961924321-Nov-12 6:17
memberMember 961924321-Nov-12 6:17 
AnswerRe: web service creation Pin
mark merrens21-Nov-12 6:24
membermark merrens21-Nov-12 6:24 
QuestionReturn multiple result set to Generic List Pin
yesu prakash20-Nov-12 23:38
memberyesu prakash20-Nov-12 23:38 
AnswerRe: Return multiple result set to Generic List Pin
David Mujica21-Nov-12 3:14
memberDavid Mujica21-Nov-12 3:14 
QuestionButtons are not working for enterkey press Pin
rakeshs31220-Nov-12 22:27
memberrakeshs31220-Nov-12 22:27 
AnswerRe: Buttons are not working for enterkey press Pin
jkirkerx22-Nov-12 18:03
memberjkirkerx22-Nov-12 18:03 
QuestionSchedule and post comments to FaceBook wall using ASP.Net Pin
Hu Dhaval20-Nov-12 21:56
memberHu Dhaval20-Nov-12 21:56 
AnswerRe: Schedule and post comments to FaceBook wall using ASP.Net Pin
Dhol Gaurav20-Nov-12 22:24
memberDhol Gaurav20-Nov-12 22:24 
GeneralRe: Schedule and post comments to FaceBook wall using ASP.Net Pin
Hu Dhaval20-Nov-12 22:32
memberHu Dhaval20-Nov-12 22:32 
AnswerRe: Schedule and post comments to FaceBook wall using ASP.Net Pin
Richard Deeming21-Nov-12 2:10
memberRichard Deeming21-Nov-12 2:10 
QuestionCOMPILATION error "object reference not set to an instance of an object" Pin
AnnLogan20-Nov-12 20:47
memberAnnLogan20-Nov-12 20:47 
QuestionRe: COMPILATION error "object reference not set to an instance of an object" Pin
n.podbielski20-Nov-12 21:11
membern.podbielski20-Nov-12 21:11 
AnswerRe: COMPILATION error "object reference not set to an instance of an object" Pin
AnnLogan20-Nov-12 21:49
memberAnnLogan20-Nov-12 21:49 
GeneralRe: COMPILATION error "object reference not set to an instance of an object" Pin
Richard MacCutchan21-Nov-12 3:16
mvpRichard MacCutchan21-Nov-12 3:16 
AnswerRe: COMPILATION error "object reference not set to an instance of an object" Pin
n.podbielski22-Nov-12 20:07
membern.podbielski22-Nov-12 20:07 
QuestionTab index with firefox issue Pin
rakeshs31220-Nov-12 19:43
memberrakeshs31220-Nov-12 19:43 
SuggestionRe: Tab index with firefox issue Pin
n.podbielski20-Nov-12 21:08
membern.podbielski20-Nov-12 21:08 
GeneralRe: Tab index with firefox issue Pin
rakeshs31220-Nov-12 22:02
memberrakeshs31220-Nov-12 22:02 
AnswerRe: Tab index with firefox issue Pin
jkirkerx22-Nov-12 18:08
memberjkirkerx22-Nov-12 18:08 
AnswerRe: Tab index with firefox issue Pin
CommDev5-Dec-12 1:55
memberCommDev5-Dec-12 1:55 
Questionadsense alternatives Pin
jrahma19-Nov-12 21:48
memberjrahma19-Nov-12 21:48 
AnswerRe: adsense alternatives Pin
ravi398420-Nov-12 20:15
memberravi398420-Nov-12 20:15 
QuestionBack Page link with Attachment asp.net 4 [Solved] Pin
εїзεїзεїз18-Nov-12 0:24
memberεїзεїзεїз18-Nov-12 0:24 
AnswerRe: Back Page link with Attachment asp.net 4 Pin
n.podbielski18-Nov-12 20:12
membern.podbielski18-Nov-12 20:12 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз18-Nov-12 20:38
memberεїзεїзεїз18-Nov-12 20:38 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
n.podbielski18-Nov-12 21:11
membern.podbielski18-Nov-12 21:11 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз18-Nov-12 21:50
memberεїзεїзεїз18-Nov-12 21:50 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
n.podbielski18-Nov-12 22:14
membern.podbielski18-Nov-12 22:14 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз19-Nov-12 21:29
memberεїзεїзεїз19-Nov-12 21:29 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
n.podbielski19-Nov-12 21:33
membern.podbielski19-Nov-12 21:33 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз19-Nov-12 23:02
memberεїзεїзεїз19-Nov-12 23:02 
AnswerRe: Back Page link with Attachment asp.net 4 Pin
Zaf Khan26-Nov-12 9:02
memberZaf Khan26-Nov-12 9:02 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз26-Nov-12 20:49
memberεїзεїзεїз26-Nov-12 20:49 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
Zaf Khan27-Nov-12 7:55
memberZaf Khan27-Nov-12 7:55 
Questioncall javascript in button1_click in bihindcode Pin
jojoba201116-Nov-12 22:22
memberjojoba201116-Nov-12 22:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 29 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid