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 6883457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:23:10+00:00 2026-05-27T05:23:10+00:00

I have a method public void DeleteItem(int ImgId, int ImgNos, int ListId) { object[]

  • 0

I have a method

public void DeleteItem(int ImgId, int ImgNos, int ListId)
        {
            object[] objParams = {0,ImgId};
            SqlHelper.ExecuteNonQuery(Conn, "DeleteItem",objParams);
            if (ItemNos == 2)
            {
                ChangeItem(ListId);
            }
        }

in deleteitem sp i am return the value as 0 or 1 now i want to get the return value on my btn click and want to check if return value is 0 then do some task and if return value is 1 then do some other task how to do that?

objGetBase.DeleteItem(ItemId, ItemNos, Convert.ToInt32(ViewState["ListId"]));
       // here i want to check the return value if return = 0 then go to next step else not            
string path1 = Path.Combine(GetDirectory(ItemName), ItemName);
File.Delete(path1);
  • 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-27T05:23:10+00:00Added an answer on May 27, 2026 at 5:23 am

    It looks like you are using the Microsoft library with SqlHelper?

    If you are things are quite simple, if you use ExecuteScalar, instead of ExecuteNonQuery you will get returned an object.

    here is a link to some examples using that Libraray:
    http://msdn.microsoft.com/en-us/library/ff647281.aspx

    From this it should be quite straightforward:

    int returnValue = (int)SqlHelper.ExecuteScalar(Conn, "DeleteItem",objParams);

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

Sidebar

Related Questions

I have the following method public static void SerializeToXMLFile(Object obj,Type type, string fileName) {
If I have a method such as: public void MyMethod(int arg1, string arg2) How
If I have a method like this: public void DoSomething(int Count, string[] Lines) {
Say I have a method: public void SomeMethod(String p1, String p2, int p3) {
If I have a method public void foo(Object... x) , I can call it
I have an interface method public void Execute(ICommand command); which needs to pass known
I have the following method: public void PutFile(string ID, Stream content) { try {
I have a method (in 3rd-party library) with BigInteger parameter: public void setValue (BigInteger
Hey - I have the following method on my UITableView controller public void RemoveEventFromList(Event
Suppose I have a method public Patient(int id) { ---- } that returns Patient

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.