Thursday, August 12, 2010

Good Thoughts

"Life is not about the people who act true to your face. It's about the people who remain true behind your back."
" The people we love are not always beautiful, but they become beautiful because we love them."
"Avoid popularity if you would have peace."
"An inch of time is an inch of gold but you can't buy that inch of time with an inch of gold."
"Friends are the sunshine of life."
"Every closed eye is not sleeping, and every open eye is not seeing."

Wednesday, November 18, 2009

Password Recovery control In Asp.Net

  1. Drage and Drop Password Recovery control
  2. Put this code in code behind file.
    protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
        MailMessage mail = new MailMessage();
          mail.From = new MailAddress(e.Message.From.Address, "Name");
            mail.Subject = "Reset Your Password";
                mail.IsBodyHtml = true;
                  mail.Body = "Your Password Has been Reset
                    mail.Body += "You can login with your new password and If Required Change this Password
                      mail.Body +="" +e.Message.Body.ToString()+"" + "
                      Thank You.

                          NetworkCredential loginInfo = new NetworkCredential("gmailID", "Password");
                            SmtpClient smtp = new SmtpClient();
                              smtp.EnableSsl = true;
                                smtp.Host = "";
                                  smtp.Credentials = loginInfo;
                                      e.Cancel = false;

                                            protected void PasswordRecovery1_SendMailError(object sender, SendMailErrorEventArgs e)
                                                e.Handled = true;

                                                  Tuesday, October 27, 2009

                                                  CheckBox in Gridview for Select All With JavaScript

                                                  ///JAVA SCRIPT CODE////
                                                  function ChangeCheckBoxState(id, checkState)
                                                  var cb = document.getElementById(id);
                                                  if (cb != null)
                                                  cb.checked = checkState;

                                                  function ChangeAllCheckBoxStates(checkState)
                                                  // Toggles through all of the checkboxes defined in the CheckBoxIDs array
                                                  // and updates their value to the checkState input parameter
                                                  if (CheckBoxIDs != null)
                                                  for (var i = 0; i < CheckBoxIDs.length; i++)
                                                  ChangeCheckBoxState(CheckBoxIDs[i], checkState);

                                                  function ChangeHeaderAsNeeded()
                                                  // Whenever a checkbox in the GridView is toggled, we need to
                                                  // check the Header checkbox if ALL of the GridView checkboxes are
                                                  // checked, and uncheck it otherwise
                                                  if (CheckBoxIDs != null)
                                                  // check to see if all other checkboxes are checked
                                                  for (var i = 1; i < CheckBoxIDs.length; i++)
                                                  var cb = document.getElementById(CheckBoxIDs[i]);
                                                  if (!cb.checked)
                                                  // Whoops, there is an unchecked checkbox, make sure
                                                  // that the header checkbox is unchecked
                                                  ChangeCheckBoxState(CheckBoxIDs[0], false);

                                                  // If we reach here, ALL GridView checkboxes are checked
                                                  ChangeCheckBoxState(CheckBoxIDs[0], true);
                                                  Then add Custome column in Gridview and Put this column Inside gridview
                                                  and columns tag//////

                                                  ///Take one Literal Control Also Outside the Gridview////

                                                  ////Now Comes to Code Behind file and Write this code in Databound event of Gridview///
                                                  protected void grdmanagejobs_DataBound(object sender, EventArgs e)
                                                  CheckBox cbHeader = (CheckBox)grdmanagejobs.HeaderRow.FindControl("HeaderLevelCheckBox");
                                                  cbHeader.Attributes["onclick"] = "ChangeAllCheckBoxStates(this.checked);";
                                                  List ArrayValues = new List();
                                                  ArrayValues.Add(string.Concat("'", cbHeader.ClientID, "'"));
                                                  foreach (GridViewRow gvr in grdmanagejobs.Rows)
                                                  CheckBox cb = (CheckBox)gvr.FindControl("RowLevelCheckBox");
                                                  cb.Attributes["onclick"] = "ChangeHeaderAsNeeded();";
                                                  ArrayValues.Add(string.Concat("'", cb.ClientID, "'"));
                                                  // CheckBoxIDsArray.Text = "script type=\"text/javascript\">" + Microsoft.VisualBasic.Constants.vbCrLf + "" + Microsoft.VisualBasic.Constants.vbCrLf + "";
                                                  CheckBoxIDsArray.Text = "";

                                                  Tuesday, October 20, 2009

                                                  Benefits Of .Net Framework

                                                  12 important advantages of ASP.NET offers over other Web development models:

                                                  1. ASP.NET drastically reduces the amount of code required to build large applications.

                                                  2. With built-in Windows authentication and per-application configuration, your applications are safe and secured.
                                                  3. It provides better performance by taking advantage of early binding, just-in-time compilation, native optimization, and caching services right out of the box.
                                                  4. The ASP.NET framework is complemented by a rich toolbox and designer in the Visual Studio integrated development environment. WYSIWYG editing, drag-and-drop server controls, and automatic deployment are just a few of the features this powerful tool provides.
                                                  5. Provides simplicity as ASP.NET makes it easy to perform common tasks, from simple form submission and client authentication to deployment and site configuration.
                                                  6. The source code and HTML are together therefore ASP.NET pages are easy to maintain and write. Also the source code is executed on the server. This provides a lot of power and flexibility to the web pages.
                                                  7. All the processes are closely monitored and managed by the ASP.NET runtime, so that if process is dead, a new process can be created in its place, which helps keep your application constantly available to handle requests.
                                                  8. It is purely server-side technology so, ASP.NET code executes on the server before it is sent to the browser.
                                                  9. Being language-independent, it allows you to choose the language that best applies to your application or partition your application across many languages.
                                                  10. ASP.NET makes for easy deployment. There is no need to register components because the configuration information is built-in.
                                                  11. The Web server continuously monitors the pages, components and applications running on it. If it notices any memory leaks, infinite loops, other illegal activities, it immediately destroys those activities and restarts itself.
                                                  12. Easily works with ADO.NET using data-binding and page formatting features. It is an application which runs faster and counters large volumes of users without having performance problems
                                                  In short ASP.NET, the next generation version of Microsoft's ASP, is a programming framework used to create enterprise-class web sites, web applications, and technologies. ASP.NET developed applications are accessible on a global basis leading to efficient information management. Whether you are building a small business web site or a large corporate web application distributed across multiple networks, ASP.NET will provide you all the features you could possibly need.

                                                  Monday, October 19, 2009

                                                  Overview of Asp.Net

                                                  ASP.NET provides services to allow the creation, deployment, and execution of Web Applications and Web Services

                                                  Like ASP, ASP.NET is a server-side technology Web Applications are built using Web Forms.

                                                  ASP.NET comes with built-in Web Forms controls, which are responsible for generating the user interface.

                                                  They mirror typical HTML widgets like text boxes or buttons. If these controls do not fit your needs, you are free to create your own user controls.

                                                  Web Forms are designed to make building web-based applications as easy as building Visual Basic applications