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

  • Home
  • SEARCH
  • 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 7609815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:15:55+00:00 2026-05-31T01:15:55+00:00

Im already 5 days trying to make jquery drag and drop with asp.net c#

  • 0

Im already 5 days trying to make jquery drag and drop with asp.net c# functionality.

I have two asp list view One contains friends list and second one is Group container. All i want to do is when user drags row item from list view and drops on group list view i want write this in sql server data table.

I have made jquery drag and drop its working good and then made asp web service im calling it with javascript and send dragged user`s name.

My web service is static method which of course cannot access to group list view to update it.
Then i tried to call my non static method which is getting data from data table and than binds my group`s lit view.

Im calling that function like this

GamerProfile gp = new GamerProfile();
GetClanData();

GamerProfile Is my web form

public partial class GamerProfile : System.Web.UI.Page

GetClanData throws error Object reference not set to an instance of an object. on this line dlClan.DataSource = _ClandCollection; I know its happening because i created new class and then called GetClanData();

Does it possible to cal GetClanData without creating new?

Is there any way out?

Can i add row to my list view from javascript?
Or make some request which will call GetClanData(non static) method?

If im trying to make this with difficult way please advice easier solution.

Thank. Sorry For my Bad English

this is my whole .js file

function SendUserToC(user) {

    var result = PageMethods.AddUserToClan(user, OnSucceeded, OnFailed);

}

function OnSucceeded(result, userContext, methodName) {
    if (result.indexOf("Warning") != -1) {
        alert(result);
    }
}


function OnFailed(error, userContext, methodName) {

}

$(document).ready(function () {

    var UserCount = 0;
    var UsersList = [];

    $(".dragable").draggable({
        helper: 'clone',
        revert: true,
        start: function () {
        }
    });

    $("#clan_drop").droppable({
        accept: ".dragable",

        drop: function (ev, ui) {

            UserCount++;

            if (UserCount > 10) {
                alert("You cannot add more users. Maximum quantity of gamers in one clan is 10");
            } else {

                $("#drag_here_container").css("display", "none");
                var droppedItem = $(ui.draggable).clone();
                $(this).append(droppedItem);
                var user = $.trim($(this).find('.friend_user_name').text());


                $('.dragable:last').remove();

                SendUserToC(user);
            }
        }

    });
});
  • 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-05-31T01:15:56+00:00Added an answer on May 31, 2026 at 1:15 am

    And you are sure that _ClandCollection is not null. Right ? If yes, then look into the code that fires up on the setter of the DataSource property of the dlClan object.

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

Sidebar

Related Questions

Since two days I am trying to consume a WCF (.NET) Soap Service and
I have already lost 2 days trying to figure out on this issue, but
How To get the number of days that have already passed from the current
I am sure this has been asked already, but I have been trying all
During last three days I have been trying to solve Project Euler 15 in
I'm trying to speed up SELECT queries in MySQL tables which already have some
Revised (clarified question) I've spent a few days already trying to figure out how
I've been trying to figure this problem out for the last 2 days already,
I am trying to get a simple prototype using ASP.NET S#arp-architecture (Sharp architecture) to
I'm trying to get my datepicker (jQuery UI Datepicker), which has one field for

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.