Tuesday, 29 May 2012

life cycle of an ASP.NET web page?


1. PreInit
2. Init
3. InitComplete
4. PreLoad
5. Load
6. Control Events
7. LoadComplete
8. PreRender
9. PreRenderComplete
10. SaveState
11. SaveStateComplete
12. Render
13. Unload

What is the difference between asp.net server controls and html servercontrols?


  1. ASP.NET Server Control is more advanced control these have more properties compared to HTML Server Controls,
  2. .NET Server controls will have events, where as HTML server controls does not have events. Both controls memory is created at Server.

Thursday, 19 April 2012

How to get a random row from a table in SQL server ?


Select Top 1 columName from Tablename Order by newid()

Where the session is stored ?


<sessionState  mode =”InProc” cookieless=”False” timeout=”20”/>


By default Cookieless is set to false – so the session Id is stored in Cookies so as long as user navigating the page you can get the session from cookies.

If you set the cookieless =”True” the session id is stored on the browser url before the file name

Ex: http://yourserver/folder/(sessionid)/default.aspx


Drawback is if the user working on the site it has assigned some sessionId on the url  , by giving the different url on Address bar and do some process once the user type same url at that time it will give different sessionid, the previous session will be lost and lost all of previous state.

Default timeout for session is 20 Mins.

Default timeout for Form authentication 30 Mins.

Difference between timestamp and uniqueidentifier ?


TimeStamp:

Size – 8 bytes.
Note based on system date or time
To track the operation in tables on the database level.

Uniqueidentifier

16 – bytes.
Value is based on the computer MAC Addresss and system datetime.
It remains unique in any system in the world.

How to write stored procedure – give syntax ?


Create Procedue <procedureName>

(
Your parameter
)
As
Begin
< your Sql Statement>
End

What is Session ?


                        Session is used to store user details particularly userid and user information so once you set the information  in session you can get the data anywhere in the project .

IE7 Issues Text Indent

                 Unfortunately IE 7 is still widespread among the users hence while theming we have to give special importance to the grea...