Open Notepad, Type:
Bush hid the facts
Close and re-open the file & see some unknown characters appears & notepad is not able to save it
Open Notepad, Type:
Bush hid the facts
Close and re-open the file & see some unknown characters appears & notepad is not able to save it
1.Create a new folder anywhere
2.Press F2. Hold "ALT" and type:255. Means just space comes instead of name
3.Right click the folder and select "Properties"
4.Then the "Customize" tab
5.Click "Change Icon..."
6.Scroll and find one without icon image, Select it
now keep your movies/songs/personal data there, however you can also make it hidden
checks "Reminders" on page if present it stores true else false in storedVars.rem
column 1 2 3
storeTextPresent Reminders rem
getEval alert(storedVars.rem)
Recreating the application domain and recompiling pages takes time, therefore unforeseen application restarts should be investigated. The application domain is unloaded when one of the following occurs:
Modification of machine.config, web.config, or global.asax.
Modification of the application's bin directory or its contents.
When the number of compilations (ASPX, ASCX, or ASAX) exceeds the limit specified by
Modification of the physical path of a virtual directory.
Modification of the code-access security policy.
The Web service is restarted.
allowoverride is used to allow child to override tags
<location path="." inheritInChildApplications="false">
<system.web> ... </system.web></location>
Imports System.Data
Imports System.Data.SqlClientImports dataConnection
Partial Class ErrInfo Inherits System.Web.UI.Page
Public error_ID As String
Public errpath As String
Dim DatabaseObject As New dataConnection
Dim datareader As SqlDataReader
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strSql As String Dim ex As Exception = dataConnection.LastError Dim ErrMsg, pageUrl, stack_info As String ErrMsg = dataConnection.LastError.InnerException.Message.ToString() pageUrl = dataConnection.lastURL.ToString stack_info = dataConnection.LastError.ToString ErrMsg = ErrMsg.Replace("'", "") ErrMsg = ErrMsg.Replace(".", "")
Dim errLine As String 'errLine = Mid(ex.ToString(), InStr(ex.ToString(), ":line") - 20, InStr(ex.ToString(), "at System") - InStr(ex.ToString(), ":line") + 20) errLine = Mid(ex.ToString(), ex.ToString().LastIndexOf(":line") + 6, 8) 'ex.ToString().LastIndexOf("at System") - ex.ToString().LastIndexOf(":line") + 20)
Dim pageArr As String() = pageUrl.Split(New [Char]() {"/"c})
Dim currDateTime As DateTime = DateTime.Now Dim errorDate As String
DatabaseObject.openDB() errorDate = currDateTime.ToString("dd/MMM/yy")
strSql = "INSERT INTO ERRORLOG VALUES ('" & dataConnection.lastURL & "','" & Request("aspxerrorpath").ToString & "','" & ErrMsg & "','" & errorDate & "')"
DatabaseObject.executeNonQuery(strSql) datareader = DatabaseObject.executeReader("SELECT IDENT_CURRENT('ERRORLOG') as error_id") If datareader.HasRows Then datareader.Read() error_ID = datareader("error_id").ToString End If
datareader.Close() datareader.Dispose()
DatabaseObject.closedb()
'send error mail to admin Dim body As String body = "
<table cellspacing="'3'" cellpadding="'3'" width="'90%'" align="'center'" border="'0'">" body += "
"
Dim page_name As String = Request("aspxerrorpath").Substring(1) 'Response.Write(body & "
" & page_name) DatabaseObject.sendMail1(body, "admin@yoursite.com", "cc", "Error on file " & page_name) 'DatabaseObject.sendMail1(body, "admin@yoursite.com", "cc", "Error on ..") End Sub
End Class
add following in global.asax:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when an unhandled error occurs dataConnection.LastError = Server.GetLastError() dataConnection.lastURL = Request.Url().ToString End Sub
add following in web.config:
<customErrors mode="Off" defaultRedirect="ErrInfo.aspx">
Caching depends upon this...
Q: What is a normalized/canonical url?
A: Canonicalization is the process of picking the best url when there are several choices. For example, most people would consider these the same urls:
www.example.com
example.com/
www.example.com/index.html
example.com/home.asp
Note: But each above URL is treated as a different URL.
Use explicit cast instead of using Eval
Eval uses reflection to evaluate argument passed.Reflection is the ability to read metadata at runtime
But explicit casting can reduce the cost of reflection. Imagine if there is 30 rows and each row has 6 Eval calls. So there will be calls to Eval 180 times. And we should take this pretty seriously.So you must be thinking what to do. Hey we can simply do something like this and improve significant performance.
Option1=============
Option2 for DataReader=====================
Option3 use of ItemDataBound Event====================
protected void Repeater_ItemDataBound(Object sender, RepeaterItemEventArgs e){ DataRowView data = (DataRowView)e.Item.DataItem; Response.Write(string.Format("
Dear User,
This blog is shown to randomly accessed users. If you have got it, means you are lucky.
Regards,
Administrator