473,322 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Error:Gridview with checkboxes

i want to have checkboxes in my gridview ...by checking it ,i can delete the row/rows.... so i have written code and got 2 Errors ...can anyone solve it...
Error:1...'gridview.RetrieveItems()': not all code paths return a value ,and
Error:2...No overload for method 'DeleteRows' takes '1' arguments

Here is my aspx.cs Code:


Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using System.Text;
  12. using System.Data.SqlClient;
  13.  
  14. public partial class gridview : System.Web.UI.Page
  15. {
  16.     protected void Page_Load(object sender, EventArgs e)
  17.     {
  18.         // Include the JavaScript functions during Form_Load() itself.
  19.         CheckBoxJSFunctions();
  20.  
  21.         if (!Page.IsPostBack)
  22.         {
  23.             PopulateGrid();
  24.         }
  25.     }
  26.     private static DataTable  RetrieveItems()<------  //ErrorNo:1
  27.     {
  28.  
  29.         //Create a connection to the SQL Server; modify the connection string for your environment
  30.             //SqlConnection MyConnection = new SqlConnection("server=(local);database=pubs;Trusted_Connection=yes");
  31.             SqlConnection MyConnection = new SqlConnection("server=(local);database=pubs;UID=myUser;PWD=myPassword;");
  32.  
  33.             // Create a Command object, and then set the connection.
  34.             // The following SQL statements check whether a GetAuthorsByLastName  
  35.             // stored procedure already exists.
  36.             SqlCommand MyCommand = new SqlCommand("select * from sysobjects where id = object_id(N'GetPosts')" +
  37.             "  and OBJECTPROPERTY(id, N'IsProcedure') = 1", MyConnection);
  38.  
  39.             // Set the command type that you will run.
  40.             MyCommand.CommandType = CommandType.Text;
  41.  
  42.             // Open the connection.
  43.             MyCommand.Connection.Open();
  44.  
  45.             // Run the SQL statement, and then get the returned rows to the DataReader.
  46.             SqlDataReader MyDataReader = MyCommand.ExecuteReader();
  47.  
  48.             // If any rows are returned, the stored procedure that you are trying 
  49.             // to create already exists. Therefore, try to create the stored procedure
  50.             // only if it does not exist.
  51.             if(!MyDataReader.Read())
  52.             {
  53.                 MyCommand.CommandText = "create procedure GetPosts" + 
  54.                     " (@date varchar(40),@title varchar(50),(@author varchar(40),@categories varchar(50),(@tags varchar(40),@comments varchar(50)(@status varchar(40), select * from Posts where" +
  55.                     " Date like @date,PTittle like @title,Author like @author,Category like @categories,Tags like @tags,TotalComments like comments,PStatus like @status; select @RowCount=@@ROWCOUNT";
  56.                 MyDataReader.Close();
  57.                 MyCommand.ExecuteNonQuery();
  58.             }
  59.             else
  60.             {
  61.                 MyDataReader.Close();
  62.             }
  63.  
  64.             MyCommand.Dispose();  //Dispose of the Command object.
  65.             MyConnection.Close(); //Close the connection.
  66.         }
  67.  
  68.  
  69.  
  70.  
  71.  
  72. //Call the stored procedure in the Click event of the btnGetAuthors button, 
  73.  
  74.         //DataTable Posts = new DataTable();
  75.         //DataTable dt = new DataTable();
  76.         //dt.Load(dr);
  77.         //if (dt != null)
  78.         //{
  79.         //    Posts = dt;
  80.         //}
  81.         //return dt;
  82.  
  83.     private void PopulateGrid()
  84.     {
  85.         // RetrieveItems() is a user defined function that calls the stored proc to retrieve data from the database.
  86.         DataTable dtItems = RetrieveItems();
  87.         GridView1.DataSource = dtItems;
  88.         GridView1.DataBind();
  89.     }
  90.  
  91.     private void CheckBoxJSFunctions()
  92.     {
  93.         StringBuilder strScript = new StringBuilder();
  94.         strScript.Append("<script language=JavaScript>");
  95.         strScript.Append("function CheckAll(checkAllBox)");
  96.         strScript.Append("{");
  97.         strScript.Append("var frm = document.form1;");
  98.         strScript.Append("var ChkState = checkAllBox.checked;");
  99.         strScript.Append("for(i=0; i<frm.length; i++)");
  100.         strScript.Append("{");
  101.         strScript.Append("e=frm.elements[i];");
  102.         strScript.Append("if(e.type == 'checkbox' && e.name.indexOf('Id') != -1)");
  103.         strScript.Append("e.checked = ChkState ;");
  104.         strScript.Append("}");
  105.         strScript.Append("}");
  106.         strScript.Append("</script>");
  107.         if (!this.IsClientScriptBlockRegistered("clientScriptCheckAll"))
  108.             this.RegisterClientScriptBlock("clientScriptCheckAll", strScript.ToString());
  109.  
  110.         //------------------------------------------------------------------------------
  111.  
  112.         strScript.Append("<script language=JavaScript>");
  113.         strScript.Append("function CheckChanged()");
  114.         strScript.Append("{");
  115.         strScript.Append("var frm = document.form1;");
  116.         strScript.Append("var boolAllChecked;");
  117.         strScript.Append("boolAllChecked=true;");
  118.         strScript.Append("for(i=0; i<frm.length; i++)");
  119.         strScript.Append("{");
  120.         strScript.Append("e = frm.elements[i];");
  121.         strScript.Append("if (e.type =='checkbox' && e.name.indexOf('Id') != -1 )");
  122.         strScript.Append("if(e.checked == false)");
  123.         strScript.Append("{");
  124.         strScript.Append("boolAllChecked = false;");
  125.         strScript.Append("break;");
  126.         strScript.Append("}");
  127.         strScript.Append("}");
  128.         strScript.Append("for(i=0; i<frm.length; i++)");
  129.         strScript.Append("{");
  130.         strScript.Append("e=frm.elements[i];");
  131.         strScript.Append("if ( e.type =='checkbox' && e.name.indexOf('checkAll') != -1 )");
  132.         strScript.Append("{");
  133.         strScript.Append("if( boolAllChecked == false)");
  134.         strScript.Append("e.checked = false ;");
  135.         strScript.Append("else if(boolAllChecked == true)");
  136.         strScript.Append("e.checked = true;");
  137.         strScript.Append("break;");
  138.         strScript.Append("}");
  139.         strScript.Append("}");
  140.         strScript.Append("}");
  141.         strScript.Append("</script>");
  142.         if (!this.IsClientScriptBlockRegistered("clientScriptCheckChanged"))
  143.             this.RegisterClientScriptBlock("clientScriptCheckChanged", strScript.ToString());
  144.     }
  145.  
  146.     // Function to get the selected checkbox values
  147.     private string GetSelected()
  148.     {
  149.         // Initially set the values to Blank 
  150.         h_chkSelected.Value = "";
  151.  
  152.         foreach (GridViewRow di in GridView1.Rows)
  153.         {
  154.             HtmlInputCheckBox chkBx = (HtmlInputCheckBox)di.FindControl("chkBoxId");
  155.  
  156.             if (chkBx != null && chkBx.Checked)
  157.             {
  158.                 Label lbl = (Label)di.FindControl("RowId");
  159.                 h_chkSelected.Value = h_chkSelected.Value + lbl.Text + ",";
  160.             }
  161.         }
  162.  
  163.         // If no checkbox selected, do not proceed further
  164.         string strDataToSend = "";
  165.         if (h_chkSelected.Value != "")
  166.         {
  167.             //Strip off the last comma before sending to stored proc 
  168.             strDataToSend = h_chkSelected.Value;
  169.             strDataToSend = strDataToSend.Substring(0, strDataToSend.Length - 1);
  170.         }
  171.         return strDataToSend;
  172.     }
  173.  
  174.     protected void btnDelete_Click(object sender, EventArgs e)
  175.     {
  176.         // This variable contains the selected rows in the format 1,2,3
  177.         string SelectedRows = GetSelected();
  178.         // User defined function that calls the stored proc to delete the selected items
  179.         DeleteRows(SelectedRows);
  180.     }
  181.  
  182.     public virtual void DeleteRows()<---------//ErrorNo:2
  183.     {
  184.         int rowIndex;
  185.     }
  186.  
  187. }
Thanx in advance......
prem
Dec 4 '08 #1
25 2682
CroCrew
564 Expert 512MB
Hello premprakashbhati,

From my understanding this is a "Classic" ASP forum. Your question should be posted in the ".NET" section under Forums/Programming Languages/.NET

Sorry,
CroCrew~
Dec 4 '08 #2
Good Morning.....

i want to have checkboxes in my gridview ...by checking it ,i can delete the row/rows.... so i have written code and got 2 Errors ...can anyone solve it...
Error:1...'gridview.RetrieveItems()': not all code paths return a value ,and
Error:2...No overload for method 'DeleteRows' takes '1' arguments

Here is my aspx.cs Code:

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using System.Text;
  12. using System.Data.SqlClient;
  13.  
  14. public partial class gridview : System.Web.UI.Page
  15. {
  16. protected void Page_Load(object sender, EventArgs e)
  17. {
  18. // Include the JavaScript functions during Form_Load() itself.
  19. CheckBoxJSFunctions();
  20.  
  21. if (!Page.IsPostBack)
  22. {
  23. PopulateGrid();
  24. }
  25. }
  26. private static DataTable RetrieveItems()<------ //ErrorNo:1
  27. {
  28.  
  29. //Create a connection to the SQL Server; modify the connection string for your environment
  30. //SqlConnection MyConnection = new SqlConnection("server=(local);database=pubs;Truste d_Connection=yes");
  31. SqlConnection MyConnection = new SqlConnection("server=(local);database=pubs;UID=my User;PWD=myPassword;");
  32.  
  33. // Create a Command object, and then set the connection.
  34. // The following SQL statements check whether a GetAuthorsByLastName 
  35. // stored procedure already exists.
  36. SqlCommand MyCommand = new SqlCommand("select * from sysobjects where id = object_id(N'GetPosts')" +
  37. " and OBJECTPROPERTY(id, N'IsProcedure') = 1", MyConnection);
  38.  
  39. // Set the command type that you will run.
  40. MyCommand.CommandType = CommandType.Text;
  41.  
  42. // Open the connection.
  43. MyCommand.Connection.Open();
  44.  
  45. // Run the SQL statement, and then get the returned rows to the DataReader.
  46. SqlDataReader MyDataReader = MyCommand.ExecuteReader();
  47.  
  48. // If any rows are returned, the stored procedure that you are trying 
  49. // to create already exists. Therefore, try to create the stored procedure
  50. // only if it does not exist.
  51. if(!MyDataReader.Read())
  52. {
  53. MyCommand.CommandText = "create procedure GetPosts" + 
  54. " (@date varchar(40),@title varchar(50),(@author varchar(40),@categories varchar(50),(@tags varchar(40),@comments varchar(50)(@status varchar(40), select * from Posts where" +
  55. " Date like @date,PTittle like @title,Author like @author,Category like @categories,Tags like @tags,TotalComments like comments,PStatus like @status; select @RowCount=@@ROWCOUNT";
  56. MyDataReader.Close();
  57. MyCommand.ExecuteNonQuery();
  58. }
  59. else
  60. {
  61. MyDataReader.Close();
  62. }
  63.  
  64. MyCommand.Dispose(); //Dispose of the Command object.
  65. MyConnection.Close(); //Close the connection.
  66. }
  67.  
  68. //Call the stored procedure in the Click event of the btnGetAuthors button, 
  69.  
  70. //DataTable Posts = new DataTable();
  71. //DataTable dt = new DataTable();
  72. //dt.Load(dr);
  73. //if (dt != null)
  74. //{
  75. // Posts = dt;
  76. //}
  77. //return dt;
  78.  
  79. private void PopulateGrid()
  80. {
  81. // RetrieveItems() is a user defined function that calls the stored proc to retrieve data from the database.
  82. DataTable dtItems = RetrieveItems();
  83. GridView1.DataSource = dtItems;
  84. GridView1.DataBind();
  85. }
  86.  
  87. private void CheckBoxJSFunctions()
  88. {
  89. StringBuilder strScript = new StringBuilder();
  90. strScript.Append("<script language=JavaScript>");
  91. strScript.Append("function CheckAll(checkAllBox)");
  92. strScript.Append("{");
  93. strScript.Append("var frm = document.form1;");
  94. strScript.Append("var ChkState = checkAllBox.checked;");
  95. strScript.Append("for(i=0; i<frm.length; i++)");
  96. strScript.Append("{");
  97. strScript.Append("e=frm.elements[i];");
  98. strScript.Append("if(e.type == 'checkbox' && e.name.indexOf('Id') != -1)");
  99. strScript.Append("e.checked = ChkState ;");
  100. strScript.Append("}");
  101. strScript.Append("}");
  102. strScript.Append("</script>");
  103. if (!this.IsClientScriptBlockRegistered("clientScript CheckAll"))
  104. this.RegisterClientScriptBlock("clientScriptCheckA ll", strScript.ToString());
  105.  
  106. //------------------------------------------------------------------------------
  107.  
  108. strScript.Append("<script language=JavaScript>");
  109. strScript.Append("function CheckChanged()");
  110. strScript.Append("{");
  111. strScript.Append("var frm = document.form1;");
  112. strScript.Append("var boolAllChecked;");
  113. strScript.Append("boolAllChecked=true;");
  114. strScript.Append("for(i=0; i<frm.length; i++)");
  115. strScript.Append("{");
  116. strScript.Append("e = frm.elements[i];");
  117. strScript.Append("if (e.type =='checkbox' && e.name.indexOf('Id') != -1 )");
  118. strScript.Append("if(e.checked == false)");
  119. strScript.Append("{");
  120. strScript.Append("boolAllChecked = false;");
  121. strScript.Append("break;");
  122. strScript.Append("}");
  123. strScript.Append("}");
  124. strScript.Append("for(i=0; i<frm.length; i++)");
  125. strScript.Append("{");
  126. strScript.Append("e=frm.elements[i];");
  127. strScript.Append("if ( e.type =='checkbox' && e.name.indexOf('checkAll') != -1 )");
  128. strScript.Append("{");
  129. strScript.Append("if( boolAllChecked == false)");
  130. strScript.Append("e.checked = false ;");
  131. strScript.Append("else if(boolAllChecked == true)");
  132. strScript.Append("e.checked = true;");
  133. strScript.Append("break;");
  134. strScript.Append("}");
  135. strScript.Append("}");
  136. strScript.Append("}");
  137. strScript.Append("</script>");
  138. if (!this.IsClientScriptBlockRegistered("clientScript CheckChanged"))
  139. this.RegisterClientScriptBlock("clientScriptCheckC hanged", strScript.ToString());
  140. }
  141.  
  142. // Function to get the selected checkbox values
  143. private string GetSelected()
  144. {
  145. // Initially set the values to Blank 
  146. h_chkSelected.Value = "";
  147.  
  148. foreach (GridViewRow di in GridView1.Rows)
  149. {
  150. HtmlInputCheckBox chkBx = (HtmlInputCheckBox)di.FindControl("chkBoxId");
  151.  
  152. if (chkBx != null && chkBx.Checked)
  153. {
  154. Label lbl = (Label)di.FindControl("RowId");
  155. h_chkSelected.Value = h_chkSelected.Value + lbl.Text + ",";
  156. }
  157. }
  158.  
  159. // If no checkbox selected, do not proceed further
  160. string strDataToSend = "";
  161. if (h_chkSelected.Value != "")
  162. {
  163. //Strip off the last comma before sending to stored proc 
  164. strDataToSend = h_chkSelected.Value;
  165. strDataToSend = strDataToSend.Substring(0, strDataToSend.Length - 1);
  166. }
  167. return strDataToSend;
  168. }
  169.  
  170. protected void btnDelete_Click(object sender, EventArgs e)
  171. {
  172. // This variable contains the selected rows in the format 1,2,3
  173. string SelectedRows = GetSelected();
  174. // User defined function that calls the stored proc to delete the selected items
  175. DeleteRows(SelectedRows);
  176. }
  177.  
  178. public virtual void DeleteRows()<---------//ErrorNo:2
  179. {
  180. int rowIndex;
  181. }
  182.  
  183. }
  184.  
Thanx in advance......
prem
Dec 5 '08 #3
Ramk
61
Error1: Where you are returning the DataTable? In cases where you don't return a data type at the scope of the method, you will receive such errors.

Error2: I guess it is DeleteRow not DeleteRows.
Dec 5 '08 #4
Good Afternoon Everyone..
I have got Error in my code for getting GridviewCheckBoxes checked and deleted....
when iam clicking Delete_Click() iam getting Error stating..................

Error:object reference not set to an instance of the object...

Note:GetSelected Function is used in Delete_Click() function
Code:aspx.cs

Expand|Select|Wrap|Line Numbers
  1.   // Function to get the selected checkbox values
  2.     private string GetSelected()
  3.     {
  4.         // Initially set the values to Blank 
  5.         h_chkSelected.Value = "";
  6.  
  7.         foreach (GridViewRow di in GridView1.Rows)
  8.         {
  9.             HtmlInputCheckBox chkBx = (HtmlInputCheckBox)di.FindControl("chkBoxId");
  10.  
  11.             if (chkBx != null && chkBx.Checked)
  12.             {
  13.                 Label lbl = new Label();
  14.  
  15.                 lbl = (Label)di.FindControl("Title");
  16.                 h_chkSelected.Value = h_chkSelected.Value + lbl.Text + ","; //Error location
  17.             }
  18.         }
  19.  
  20.         // If no checkbox selected, do not proceed further
  21.         string strDataToSend = "";
  22.         if (h_chkSelected.Value != "")
  23.         {
  24.             //Strip off the last comma before sending to stored proc 
  25.             strDataToSend = h_chkSelected.Value;
  26.             strDataToSend = strDataToSend.Substring(0, strDataToSend.Length - 1);
  27.         }
  28.         return strDataToSend;
  29.     }
Dec 5 '08 #5
Ramk
61
Do this
MyClass myObj = new MyClass();
myObj.MyMethod();
Dec 5 '08 #6
thanx for ur cooperation...
but still, iam getting no errors in my app but ia ma not able to delete the row on Delete_Click()


i think some thing wrong in DeleteRow() function....
if wrong plz help me out ..
thanx again...
Expand|Select|Wrap|Line Numbers
  1. protected void btnDelete_Click(object sender, EventArgs e)
  2.     {
  3.         // This variable contains the selected rows in the format 1,2,3
  4.         string SelectedRows = GetSelected();
  5.         // User defined function that calls the stored proc to delete the selected items
  6.         DeleteRows(SelectedRows);
  7.     }
  8.  
  9.  
  10.  
  11.     public static void DeleteRows(string  PTittle)
  12.     {
  13.  
  14.         SqlConnection MyConnection = new SqlConnection("server=(local);database=BlogDatabase;UID=sa;PWD=meritinfo;");
  15.         SqlCommand MyCommand = new SqlCommand("Delete  from Posts where PTittle=@PTittle ", MyConnection);
  16.         MyCommand.Parameters.Add(new SqlParameter("@PTittle", PTittle));
  17.         MyCommand.CommandType = CommandType.Text;
  18.         MyCommand.Connection.Open();
  19.         SqlDataReader dr = null;
  20.         dr = MyCommand.ExecuteReader();
  21.         //DataTable Posts = new DataTable();
  22.         //DataTable dt = new DataTable();
  23.         //dt.Load(dr);
  24.         //if (dt != null)
  25.         //{
  26.         //    Posts = dt;
  27.         //}
  28.  
  29.  
  30.     }
Dec 5 '08 #7
good evening..
iam implementing checkboxes in gridview and wanna delete gridview row on checked in Delete_Click() event...
till now iam getting no errors in my app but still iam not able to delete the row/rows..
i think the below DeleteRow() is not properly builded...

plz help me out...
thanx............



Expand|Select|Wrap|Line Numbers
  1. protected void btnDelete_Click(object sender, EventArgs e)
  2.     {
  3.         // This variable contains the selected rows in the format 1,2,3
  4.         string SelectedRows = GetSelected();
  5.         // User defined function that calls the stored proc to delete the selected items
  6.         DeleteRows(SelectedRows);
  7.     }
  8.  
  9.  
  10.  
  11.  
  12.     public static void DeleteRows(string  PTittle)
  13.     {
  14.  
  15.         SqlConnection MyConnection = new SqlConnection("server=(local);database=BlogDatabase;UID=sa;PWD=meritinfo;");
  16.         SqlCommand MyCommand = new SqlCommand("Delete  from Posts where PTittle=@PTittle ", MyConnection);
  17.         MyCommand.Parameters.Add(new SqlParameter("@PTittle", PTittle));
  18.         MyCommand.CommandType = CommandType.Text;
  19.         MyCommand.Connection.Open();
  20.         SqlDataReader dr = null;
  21.         dr = MyCommand.ExecuteReader();
  22.         //DataTable Posts = new DataTable();
  23.         //DataTable dt = new DataTable();
  24.         //dt.Load(dr);
  25.         //if (dt != null)
  26.         //{
  27.         //    Posts = dt;
  28.         //}
  29.  
  30.  
  31.     }
Dec 5 '08 #8
dmj07
55
Try putting this after you have opened the connection:

MyCommand.ExecuteNonQuery();
Dec 5 '08 #9
Ramk
61
Check the query
Delete from Posts where PTittle= @PTittle. But you are collecting the row numbers instead of titles in your GetSelected method.
Use the following code to achieve your goal.
Expand|Select|Wrap|Line Numbers
  1.  
  2. public static void DeleteRows(string PID)
  3.         {
  4.             SqlConnection MyConnection = new SqlConnection("server=CPC477-0039;database=BlogDatabas e;UID=sa;PWD=cart;");
  5.             SqlCommand MyCommand = new SqlCommand("Delete from Posts where PID=@PID", MyConnection);
  6.             MyCommand.Parameters.Add(new SqlParameter("@PID", PID));
  7.             MyCommand.CommandType = CommandType.Text;
  8.             MyCommand.Connection.Open();
  9.  
  10.             MyCommand.ExecuteNonQuery();
  11.         }
  12.  
  13.  
Dec 5 '08 #10
dear,
still not working..
do u think DeleteRow(_______) function parameter is not proper accordingly because here we need selectedrow/rows.
as u said In myTable ,no PID is exist
MyTable fields are ---->>>>Date,PTittle,Category,Tags,TotalComments,PStat us,Author.
Dec 5 '08 #11
Curtis Rutland
3,256 Expert 2GB
Please don't double (or quadruple, in your case) post your questions. If you made a mistake and need to change your question, you can click the Edit button to edit your post, or you can post your corrections in a reply to your original thread. If you can't find your original thread, click the "My Subscriptions" link near the top of the page. If you feel that your question has been overlooked, post a reply to it to "bump" it back to the top of the forum. We ask that you do this only once every 24 hours.

So there is no reason to double post. It makes it hard on the Experts and you to keep track of what help you've already been given.

Threads merged.

Also,
Please enclose your posted code in [CODE] [/CODE] tags (See How to Ask a Question). Code tags preserve indention and uses a monospaced font.

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [CODE] [/CODE] tags in future.


MODERATOR
Dec 5 '08 #12
Frinavale
9,735 Expert Mod 8TB
@premprakashbhati
Did you make the changes suggested by dmj07:
@dmj07
Your DeleteRow() method accepts single String parameter "PTitle".
Your variable names are confusing....you are calling a function that is named "GetSelectedRows" and passing this result to your Delete method. Make sure that this "GetSelectedRows" method properly returns a "PTitle" (and consider renaming things so that this is obvious).

The other thing is: have you checked your database to see if it has deleted?

Please post any modified code so that we can see what you are currently working with.
Also please remember to use code tags when posting code snippets.

-Frinny
Dec 5 '08 #13
goodmorning Frinovale....

as u said use return of Getselected() function which is strDataToSend obviously it is a collection of selected rows in a gridview.
i wanna know that if we give strDataToSend parameter to the DeleteRows(_______) then what is the select statement for delete....

According to me Delete statement takes only the Database Table field name as parameter...
so plz show me the way....
thanx...

Code:aspx.cs

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using System.Text;
  12. using System.Data.SqlClient;
  13.  
  14. public partial class gridview : System.Web.UI.Page
  15. {
  16.     protected void Page_Load(object sender, EventArgs e)
  17.     {
  18.         // Include the JavaScript functions during Form_Load() itself.
  19.         CheckBoxJSFunctions();
  20.  
  21.         if (!Page.IsPostBack)
  22.         {
  23.             PopulateGrid();
  24.         }
  25.     }
  26.     private static DataTable RetrieveItems()
  27.     {
  28.         SqlConnection MyConnection = new SqlConnection("server=Merit4;database=BlogDatabase;UID=sa;PWD=meritinfo;");
  29.         SqlCommand MyCommand = new SqlCommand("select Date,PTittle as Title,Author,Category as Categories,Tags,TotalComments as Comments,PStatus as Status from Posts", MyConnection);
  30.         MyCommand.CommandType = CommandType.Text;
  31.         MyCommand.Connection.Open();
  32.         SqlDataReader dr = null;
  33.         dr = MyCommand.ExecuteReader();
  34.         DataTable Posts = new DataTable();
  35.         DataTable dt = new DataTable();
  36.         dt.Load(dr);
  37.         if (dt != null)
  38.         {
  39.             Posts = dt;
  40.         }
  41.         return dt;
  42.     }
  43.  
  44.  
  45.     private void PopulateGrid()
  46.     {
  47.         // RetrieveItems() is a user defined function that calls the stored proc to retrieve data from the database.
  48.         DataTable dtItems = RetrieveItems();
  49.         GridView1.DataSource = dtItems;
  50.         GridView1.DataBind();
  51.     }
  52.  
  53.  
  54.     private void CheckBoxJSFunctions()
  55.     {
  56.         StringBuilder strScript = new StringBuilder();
  57.         strScript.Append("<script language=JavaScript>");
  58.         strScript.Append("function CheckAll(checkAllBox)");
  59.         strScript.Append("{");
  60.         strScript.Append("var frm = document.form1;");
  61.         strScript.Append("var ChkState = checkAllBox.checked;");
  62.         strScript.Append("for(i=0; i<frm.length; i++)");
  63.         strScript.Append("{");
  64.         strScript.Append("e=frm.elements[i];");
  65.         strScript.Append("if(e.type == 'checkbox' && e.name.indexOf('Id') != -1)");
  66.         strScript.Append("e.checked = ChkState ;");
  67.         strScript.Append("}");
  68.         strScript.Append("}");
  69.         strScript.Append("</script>");
  70.         if (!this.IsClientScriptBlockRegistered("clientScriptCheckAll"))
  71.             this.RegisterClientScriptBlock("clientScriptCheckAll", strScript.ToString());
  72.  
  73.         //------------------------------------------------------------------------------
  74.  
  75.         strScript.Append("<script language=JavaScript>");
  76.         strScript.Append("function CheckChanged()");
  77.         strScript.Append("{");
  78.         strScript.Append("var frm = document.form1;");
  79.         strScript.Append("var boolAllChecked;");
  80.         strScript.Append("boolAllChecked=true;");
  81.         strScript.Append("for(i=0; i<frm.length; i++)");
  82.         strScript.Append("{");
  83.         strScript.Append("e = frm.elements[i];");
  84.         strScript.Append("if (e.type =='checkbox' && e.name.indexOf('Id') != -1 )");
  85.         strScript.Append("if(e.checked == false)");
  86.         strScript.Append("{");
  87.         strScript.Append("boolAllChecked = false;");
  88.         strScript.Append("break;");
  89.         strScript.Append("}");
  90.         strScript.Append("}");
  91.         strScript.Append("for(i=0; i<frm.length; i++)");
  92.         strScript.Append("{");
  93.         strScript.Append("e=frm.elements[i];");
  94.         strScript.Append("if ( e.type =='checkbox' && e.name.indexOf('checkAll') != -1 )");
  95.         strScript.Append("{");
  96.         strScript.Append("if( boolAllChecked == false)");
  97.         strScript.Append("e.checked = false ;");
  98.         strScript.Append("else if(boolAllChecked == true)");
  99.         strScript.Append("e.checked = true;");
  100.         strScript.Append("break;");
  101.         strScript.Append("}");
  102.         strScript.Append("}");
  103.         strScript.Append("}");
  104.         strScript.Append("</script>");
  105.         if (!this.IsClientScriptBlockRegistered("clientScriptCheckChanged"))
  106.             this.RegisterClientScriptBlock("clientScriptCheckChanged", strScript.ToString());
  107.     }
  108.  
  109.  
  110.  
  111.     // Function to get the selected checkbox values
  112.     private string GetSelected()
  113.     {
  114.         // Initially set the values to Blank 
  115.         h_chkSelected.Value = "";
  116.  
  117.         foreach (GridViewRow di in GridView1.Rows)
  118.         {
  119.             HtmlInputCheckBox chkBx = (HtmlInputCheckBox)di.FindControl("chkBoxId");
  120.  
  121.             if (chkBx != null && chkBx.Checked)
  122.             {
  123.  
  124.                 Label lbl = (Label)di.FindControl("Title");
  125.                 lbl = new Label();
  126.                 h_chkSelected.Value = h_chkSelected.Value + lbl.Text  + ",";
  127.             }
  128.         }
  129.  
  130.         // If no checkbox selected, do not proceed further
  131.         string strDataToSend = "";
  132.         if (h_chkSelected.Value != "")
  133.         {
  134.             //Strip off the last comma before sending to stored proc 
  135.             strDataToSend = h_chkSelected.Value;
  136.             strDataToSend = strDataToSend.Substring(0, strDataToSend.Length - 1);
  137.         }
  138.         return strDataToSend;
  139.     }
  140.  
  141.  
  142.  
  143.     protected void btnDelete_Click(object sender, EventArgs e)
  144.     {
  145.         // This variable contains the selected rows in the format 1,2,3
  146.         string SelectedRows = GetSelected();
  147.         // User defined function that calls the stored proc to delete the selected items
  148.         DeleteRows(SelectedRows);
  149.     }
  150.  
  151.     public static void DeleteRows(string  strDataToSend)    
  152.     {
  153.  
  154.         SqlConnection MyConnection = new SqlConnection("server=(local);database=BlogDatabase;UID=sa;PWD=meritinfo;");
  155.         SqlCommand MyCommand = new SqlCommand("Delete  from Posts where PTittle In ("+@PTittle+")",MyConnection);
  156.         MyCommand.Parameters.Add(new SqlParameter("@PTittle", PTittle));
  157.         MyCommand.CommandType = CommandType.Text;
  158.         MyCommand.Connection = MyConnection;
  159.         MyConnection.Open();
  160.         //MyCommand.Connection.Open();
  161.         //SqlDataReader dr = null;
  162.         //dr = MyCommand.ExecuteReader();
  163.         //dr.Close();
  164.         MyCommand.ExecuteNonQuery();
  165.         //DataTable Posts = new DataTable();
  166.         //DataTable dt = new DataTable();
  167.         //dt.Load(dr);
  168.         //if (dt != null)
  169.         //{
  170.         //    Posts = dt;
  171.         //}
  172.  
  173.  
  174.     }
  175.  
  176.  
  177. }
  178.  
  179.  
  180.  

Code:.aspx


Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="gridview" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head id="Head1" runat="server">
  5.     <title>Grid View and Check Boxes</title>
  6. </head>
  7. <body>
  8.     <form id="form1" runat="server">
  9.     <div>
  10.     <input id="h_chkSelected" name="h_chkSelected" type="hidden" runat="server" value=""/>&nbsp;
  11.     <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Font-Names="Verdana" Font-Size="12px" Width="987px" CellPadding="3" EmptyDataText="No Items Found.">
  12.                 <RowStyle BackColor="Beige" HorizontalAlign="Left" Height="15px" />
  13.                 <HeaderStyle BackColor="Control" Font-Names="Verdana" Font-Size="12px" ForeColor="Black" HorizontalAlign="Left" Height="20px" />
  14.                 <Columns>
  15.                     <asp:TemplateField>
  16.                         <ItemStyle Width="5%"></ItemStyle>
  17.                         <HeaderTemplate>
  18.                           <input type="checkbox" id="checkAll" onclick="CheckAll(this);" runat="server" name="checkAll"/>
  19.                         </HeaderTemplate>
  20.                         <ItemTemplate>
  21.                             <input type="checkbox" runat="server" id="chkBoxId" name="chkBoxId" onclick="CheckChanged();" />
  22.                         </ItemTemplate>
  23.                     </asp:TemplateField>
  24.                     <asp:TemplateField Visible="False">
  25.                         <%--<ItemTemplate>
  26.                             <asp:Label id="RowId" Text='<% #DataBinder.Eval(Container.DataItem, "ItemId") %>' runat="server" />
  27.                         </ItemTemplate>--%>
  28.                     </asp:TemplateField>
  29.                 <asp:BoundField DataField="Date" HeaderText="Date" />
  30.                 <asp:BoundField DataField="Title" HeaderText="Title" />
  31.                 <asp:BoundField DataField="Author" HeaderText="Author" />
  32.                 <asp:BoundField DataField="Categories" HeaderText="Categories" />
  33.                 <asp:BoundField DataField="Tags" HeaderText="Tags" />
  34.                 <asp:BoundField DataField="Comments" HeaderText="Comments" />
  35.                 <asp:BoundField DataField="Status" HeaderText="Status" />
  36.                  <asp:TemplateField>
  37.                         <ItemStyle Width="5%"></ItemStyle>
  38.  
  39.                         <ItemTemplate>
  40.                             <input type="button"  fontsize="XX-Small"  value="Publish"  runat="server" id="btnpublish" name="btnpub" onclick="CheckChanged();" />
  41.                         </ItemTemplate>
  42.                     </asp:TemplateField>
  43.                 </Columns>
  44.                 <PagerStyle BackColor="Control" ForeColor="Black" Height="10px" HorizontalAlign="Center" />
  45.         </asp:GridView>
  46.  
  47.  
  48.  
  49.         &nbsp  &nbsp   &nbsp   &nbsp   &nbsp   &nbsp   &nbsp   &nbsp   &nbsp  &nbsp  &nbsp   &nbsp  &nbsp   &nbsp   &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp&nbsp  
  50.         <table style="z-index: 102; left: 19px; width: 282px; position: absolute; top: 520px">
  51.             <tr>
  52.                 <td style="width: 100px">
  53.                 </td>
  54.             </tr>
  55.         </table>
  56.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  57.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  58.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  59.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  60.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  61.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  62.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  63.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  64.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp  &nbsp 
  65.         <asp:Button ID="btnDelete" runat="server" Font-Names="Verdana" Font-Size="Small"
  66.             Style="z-index: 101; left: 73px; position: absolute; top: 523px" Text="Delete Selected" OnClick="btnDelete_Click" />
  67.     </div>
  68.     </form>
  69. </body>
  70. </html>
Dec 6 '08 #14
Ramk
61
As pointed by insertAlias, do wrap your code in [code] blocks. Plz click the # button on your reply window(Prob sits at the extreme right on the top).The cursor will be in between the CODE blocks, then do paste your code.

Remove the following line of code from your GetSelected function.
lbl = new Label(); After finding the control, you are creating new Lable whose text property will be EMPTY with the above statment.

I think, now you can solve your issue easily.
Dec 6 '08 #15
dear goodevening..
as u said i have removed lbl=new label() from code in my GetSelected() function

iam getting Error:
Null Reference Exception: Object reference not set to an instance of an object.


so plz see to it
Dec 6 '08 #16
Ramk
61
Where it is causing the exception?
Did you check the string passed to DeleteRows method?
Do post the strDataToSend along with the exception where it occurred.

Try this:
Expand|Select|Wrap|Line Numbers
  1.  Label lbl = (Label)di.FindControl("Title");
  2. //lbl = new Label();
  3. if(lbl != null)
  4. h_chkSelected.Value = h_chkSelected.Value + lbl.Text + ",";
  5.  
Dec 6 '08 #17
Mr.Ramk,
At
Label lbl=(Label)di.FindControl("Title")


Description:
di = DataGridRow which is selected
Title = Fieldname in DataGridView


Here i am getting Row No's in di object but it cannot be initialize to the object lbl ,it is showing null value..


so plz see to it..
Dec 6 '08 #18
Curtis Rutland
3,256 Expert 2GB
I have asked you once to use [code] tags. This is not a request, it is a requirement of this site.

You need to start surrounding your code with [CODE] code goes here [/CODE] like that.

MODERATOR
Dec 6 '08 #19
Ramk
61
@insertAlias
The FindControl method takes the Control ID as parameter to search the controls on the form.
Does your "Title" is ID of your control?
Do check it once again.
Dec 7 '08 #20
GoodMorning,,
yes Title is a label control in the grid....

Expand|Select|Wrap|Line Numbers
  1. private string GetSelected()
  2.     {
  3.         // Initially set the values to Blank 
  4.         h_chkSelected.Value = "";
  5.  
  6.         foreach (GridViewRow di in GridView1.Rows)
  7.         {
  8.             HtmlInputCheckBox chkBx = (HtmlInputCheckBox)di.FindControl("chkBoxId");
  9.  
  10.             if (chkBx != null && chkBx.Checked)
  11.             {
  12.                   Label lbl = (Label)di.FindControl("Title") ;
  13.                  if (lbl != null)
  14.                 {
  15.  
  16.                     h_chkSelected.Value = h_chkSelected.Value + lbl.Text + ",";
  17.  
  18.               }
  19.             }
  20.         }
  21.  
  22.         // If no checkbox selected, do not proceed further
  23.  
  24.  string strDataToSend = "";
  25.         if (h_chkSelected.Value != "")
  26.         {
  27.             //Strip off the last comma before sending to stored proc 
  28.  
  29.             strDataToSend  = h_chkSelected.Value;
  30.             strDataToSend  = strDataToSend.Substring(0, strDataToSend.Length - 1);
  31.         }
  32.         return strDataToSend ;
  33.     }
  34.  
  35.  
Dec 8 '08 #21
Ramk
61
Can you show me the return string of GetSelected()? Is it ,,, something like that?
Dec 8 '08 #22
strDataToSend is the return string...
actually i want to know how this string is given as parameter to Delete_Click()
and how in delete command statement....that is Delete from Tablename where
________..... is declared...
I know the procedure when we use SqlDatasource but Dynamically in coding how we have to place that strDataToSend in delete command...like

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.    string  title = Convert.ToString (GridView1.DataKeys[di.RowIndex].Value);
  4.  
  5.                 // Pass the value of the selected title to the Delete command.
  6.  
  7.    SqlDataSource1.DeleteParameters["PTittle"].DefaultValue = title.ToString();
  8.     SqlDataSource1.Delete();
  9.  
  10.  
Dec 8 '08 #23
Ramk
61
Expand|Select|Wrap|Line Numbers
  1.  
  2. DELETE
  3. FROM TABLE_NAME
  4. WHERE TITLE IN ('Title1', 'Title2', 'Title3')
  5.  
Dec 8 '08 #24
Frinavale
9,735 Expert Mod 8TB
Hi Premprakashbhati,

I'm sorry that I was unable to respond sooner but I have a feeling that you need to change your code around a bit.

What you need to do is delete the rows that are selected by:

1. Loop through all of the rows selected
2. When you find a row that is selected, call your DeleteRows method and pass it the "PTittle" of the selected row.

So instead of:
Expand|Select|Wrap|Line Numbers
  1. // This variable contains the selected rows in the format 1,2,3
  2.    string SelectedRows = GetSelected();
  3. // User defined function that calls the stored proc to delete the selected items
  4.    DeleteRows(SelectedRows);
  5.  
You would do something like:
Expand|Select|Wrap|Line Numbers
  1.          foreach (GridViewRow di in GridView1.Rows)
  2.          {
  3.              HtmlInputCheckBox chkBx = (HtmlInputCheckBox)di.FindControl("chkBoxId");
  4.  
  5.              if (chkBx != null && chkBx.Checked)
  6.              {
  7.                  //Here find your PTittle value and call your DeleteRows() function passing it the PTittle value.
  8.  
  9.              }
  10.          }
-Frinny
Dec 8 '08 #25
Ramk
61
Does the DELETE query helped you in?Hope it's +ve!
Dec 11 '08 #26

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Faybert | last post by:
Hello, and Thanks in advance for any light you might shed on my troubles. I'm trying to setup a series of checkboxes, or a checkboxlist to control the results that are shown on a gridview...
0
by: ssims | last post by:
I've got a GridView that's sorted by a stored procedure with ROW_NUMBER: PROCEDURE dbo.GetCalendarsByStatusIDPaged ( @startRowIndex int, @maximumRows int, @statusID int ) AS
0
by: CSharpguy | last post by:
I have code that exports a grid view to Excel, but when I put that code in my content page of my master pages, I get an error, gridview must be in a <form runat=servertag. So how can I export a...
9
by: mike7510uk | last post by:
Hi, I am using a gridview with a templatefield containing a checkbox. I want to update the database with a 1 or 0 depending on if a checkbox is checked or unchecked (then use the 1 or 0 later on...
3
by: shapper | last post by:
Hello, I need to loop though each row in a GridView and if the checkbox is a Template Field is checked I want to display the value of an invisible column named "LevelName". I tried everything...
4
by: beton3000 | last post by:
Hello! I'm building a GridView using code to add template fields, because there is a random number of columns in result set from database. I'm using a class with ITemplate interface for defining...
6
by: vijeberal | last post by:
Hi all, I am working on a GridView and there exist a Checkbox control .. iplaced another checkbox in header also i have written a javascript for selection of checkboxex fro e.g if you click on...
10
by: gh | last post by:
I am using VS 2008. I have a gridview with several columns that are checkboxes. The data for each column is either a 1 or 0. When I try to view the page in the browser I get an error "Specified...
1
by: idan | last post by:
Here's my data: (Table: EmployeePlan) EmpID Plan Status abc123 PlanA A abc123 PlanB D abc123 PlanC A xyz789 PlanA D xyz789 PlanB D xyz789 PlanC...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.