Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8149499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:51:53+00:00 2026-06-06T14:51:53+00:00

Note: There was not any question with this kind of problem here or anywhere…

  • 0

Note: There was not any question with this kind of problem here or anywhere…

Ok, so I made my listview, and it’s delete and edit events are working properly, now I want to implement a possibility for user to mark an element as “default”.

D, E and Def are buttons

Reference
----------------------------------------------------------------
- ref1  - somevalue - somevalue - somevalue - [D] - [E] - [Def]
----------------------------------------------------------------

so that would be a row from a table, I made delete and edit work by handling events from listview,

Private Sub lvMain_ItemDelete(ByVal sender As Object, ByVal e As ListViewDeleteEventArgs) Handles lvMain.ItemDeleting
   Dim refFac As new ReferenceFactory
   refFac.Delete(e.Keys(0))
EndSub

similar for Editing. But now when I try to get values from Default button, the button wont even do anything…
This is the code:

<asp:ImageButton ID="ibtDefault" runat="server" ImageUrl="~/Images/Default16.png" CommandName="Default" />

and for my logic:

Public Sub ibtDefault_Click(ByVal sender As Object, ByVal e As ImageClickEventArgs )
   SelectedRef.Name = "Test"
End Sub

I just wanted to test it whether it will run or not by changing the value of my global string that will show which Reference is made default. But it wont even do that…
Then I tried with Commands.

Private Sub lvMain_ItemCommand(ByVal sender As Object, ByVal e As ListViewCommandEventArgs) Handles lvMain.ItemCommand
   If e.CommandName = "Default" Then
      'Dim refID As New Integer
      'Dim refer As ListViewItem
      'refer = e.Item

      SelectedRef.Name = "Test"
   End If
End Sub

But this wont run either… What am I doing wrong here :S

Basically what I want to is that on click i save Reference Name and ID in two global variables i prepared.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:51:54+00:00Added an answer on June 6, 2026 at 2:51 pm

    Default is a reserved word and may be messing with your code. When you run through your ItemCommand event, you can rebind the data at the end of it and it should refresh your page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[Note: There is another thread about this problem but it did not answer the
NOTE : Right before posting this question it occurred to me there's a better
There are many variants on this kind of question. However I am specifically after
This is not a programming question, but a question on the best practice for
NOTE: this question is almost a dupe of: stop Ms Excel auto-formatting numeric strings
This is kind of a 'double' question that might have a single answer. I'm
Note: This is a follow up to this question . I have a legacy
This is NOT a question on plain old boring customization; I actually want to
Disclaimer: I am kind of cross-posting this question on the Texas Instruments Forum ,
NOTE: I know there are many questions that talked about that but I'm still

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.