Check the fan which is fit on ur processor. Whether it is fit properly else try 2 apply coolent cream which might have gone dry
scotchy2hotty2k2
Posts
-
System Hangs without any reason. -
Creating a Search ControlHi all I want to create a very generic search control which i can use it on any page.so as to search the data from the table provided by user,list of columns and the sql will be dynamically created depending on textbox id and there respective values. Please Suggest how do i create a server control so that i can use it on any page which will be either return dynamic sql or datasource for binding with gridview. protected void Button1_Click(object sender, EventArgs e) { string conn=server=localhost;database=MyData;uid=sa;password=password"; SqlConnection sconn = new SqlConnection(); sconn.ConnectionString = conn; ArrayList ar = new ArrayList(); ArrayList ar1 = new ArrayList(); foreach (Control c in Panel1.Controls) { Type t = c.GetType(); string id; string value; string name = t.Name; TextBox t1 = null; if (name.Equals("TextBox")) { id = c.ClientID; ar.Add(id); t1 = (TextBox)c; if (t1.Text.Length>0) { value = t1.Text; } else { value = "%"; } ar1.Add(value); } } bool lbHasWhere = false; StringBuilder loBuffer = new StringBuilder(); loBuffer.Append("Select '"+columns+"' From '" + tablename+ "'"); for (int k = 0; k < ar.Count; k++) { if (lbHasWhere) loBuffer.Append(" And "); else { loBuffer.Append(" Where "); lbHasWhere = true; } loBuffer.Append("" + ar[k] + " like '" + ar1[k] + "'"); } SqlCommand scomm = new SqlCommand(); scomm.CommandText = loBuffer.ToString(); scomm.Connection = sconn; sconn.Open(); SqlDataReader sdr = scomm.ExecuteReader(); GridView1.DataSource = sdr; GridView1.DataBind(); sconn.Close(); } }
-
adding columns to grid view programaticallyHi all I want to create a grid view control which inherits from grid view. Now after i bind it datasource i want to hide some columns from gridview. also i want to add some controls like checkbox ,dropdownlist. How do i do this programatically.i dont want to do this using design view. Please suggest which methods should i override and how do i create template here.. Waiting for answer Tejesh
-
Need some Docs for Grid ControlHi all , I want to prepare my custom control which inherits from grid control The control must bind the data at runtime where no of columns can be unknown and also i want to hide some columns,depending on the user input[property set]. There are also many things to be done like some times use tree control inside it. If double click on any row open a new .aspx page set by user and transfer that row content to that page[parent/child]. Please provide me link where i can find detail docs for this as i hv tried searching on google but cant find the relevant. Scotchy
-
gridviewU must store the password in the database in the encrypted fashion for the security reason. And when u want to retrive,retrive as it is
-
webcontrol returns object not set to refrence error while setting the propertyThx navaneeth for the soln.. Actually i was trying to place the control in the master page content holder.. Thus was getting the error. the Problem is solved.
-
Destroy VariablesThe variables are automatically destroyed once they are out of there scope. If u are talking abt object.Let the asp.net garbage collector handle it for u.
-
webcontrol returns object not set to refrence error while setting the propertyplz dont mind, can u suggest wht info do u need.
-
webcontrol returns object not set to refrence error while setting the propertyhi all , Created a web control for menu where i am trying to set the property by passing hashtable. Dont know y it throws error
-
Signout not workingThx Rajeesh for the soln.. I dont know whether this is correct or not.. I have inserted the code in MasterPage and working for me.. just want to know whether things can be made at the Global.asax Regards scotchy
modified on Tuesday, January 13, 2009 1:18 AM
-
dd/mm/yyyy to mm/dd/yyyy formatstring date = textBox1.Text; DateTimeFormatInfo dateTimeFormatterProvider = DateTimeFormatInfo.CurrentInfo.Clone() as DateTimeFormatInfo; dateTimeFormatterProvider.ShortDatePattern = "dd/MM/yyyy"; DateTime dateTime = DateTime.Parse(date, dateTimeFormatterProvider); string formatted = dateTime.ToString("MM/dd/yyyy"); response.write(formatted); I hope this resolves ur problem
-
Signout not workingI have created a link button as signout. On click of liink button i have done following coding FormsAuthentication.SignOut(); Response.Redirect("Login1.aspx"); This works only if i try to access any page by typing in url. but if i click on back button it permits me to visit the page.. Might be my cookies are interfering with this as i have used persistant cookie on the login page.. Please suggest a soln to this scotchy