Answer the Tricky Questions

Posted by Vishnupavadi under ASP.NET on 2/22/2012 | Points: 10 | Views : 15855 | Status : [Member] | Replies : 11
Hi everyone,
'm unable to find out the answer for some questions, please anybody answer for below listed questions.
please help me. i 'll be thankful..... :)

1. In a Load Balancing environment, Which way you choose to maintain state info, if security is important?

2. What Command Line Tools do we have in .net environment?

3. What is the plugin architecture? how to use it?

4. What is the purpose of XSLT other than displaying XML contents in HTML?

5. How to refresh a static HTML page?

6. How to declare the XSLT document?

7. What are the data Islands in XML?

8.Using ADO.NET Datareader a user extracted data from a database table having 5 records.What happens if another user adda 5 more
records to the table same time.Can the first user extracted records become 10 instead of 5 or will it remain same 5?
what about same case when ADO ? pls explain in detail.

9. Using ADO.NET Datareader a user extracts data from a database table having 1000 rows.He closed his browser in between.
that is after fetching only 50 records. What happens to the Datareader?will it remain connected?
and will fetch 1000 records and what after? will garbage collector collect and dispose it soon?

10. A user fetched dtata from a database table using Dataset(Disconnected records) for updation.
Another user deleted the table just after. what happens when the first user try to update the table after changes? Error or Something else?

11. Where is session id stored in ASP? in IIS aerver or ASP Engine?

12. What is the user in an asp.net application?

13. How can you unload an asp.net app without touching the iis?

14. How to bind Three Different DropdownList Boxes?
i meen
first one --- Dropdown DAY
second------Dropdown month
thirdone-----DropDown Year
so i want to store date format in DateDataSource column.

15. What is default datatype in .net?

16. From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important?

17. What are ASHX files? What are HttpHandlers? Where can they be configured?

18. What is needed to configure a new extension for use in ASP.NET? For example, what if I wanted my system to serve ASPX files with a *.jsp extension?

19. What events fire when binding data to a data grid? What are they good for?

20. Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?

21. How does ViewState work and why is it either useful or evil?

22. What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?

23. How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in IIS5? IIS6?

24. What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?

25. Compare and contrast - LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().




Responses

Posted by: Rajkatie on: 2/22/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Hi,
Q. 15 Default access specifier in c# is internal , where in vb its friend.
But if you are talking about default keyword, then it can be used in the switch statement or in generic code. Suppose given variable t of a parameterized type T, then t = null is only valid if T is a reference type or t = 0 will only work for numeric value types but not for structs.

Rajesh Patel
.Net Trainer(MSCD | MCT | MS)
Brainbench (Asp.Net 4.5 and C# 5.0)

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajkatie on: 2/22/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
11) In asp, session info is stored in the memory of IIS server.

Rajesh Patel
.Net Trainer(MSCD | MCT | MS)
Brainbench (Asp.Net 4.5 and C# 5.0)

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajkatie on: 2/22/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
21) For Viewstate working refer following link
http://msdn.microsoft.com/en-us/library/bb386448.aspx

23) IIS communicate at runtime with ASP.NET, refer following link
http://dotnetslackers.com/articles/iis/ASPNETInternalsIISAndTheProcessModel.aspx

Rajesh Patel
.Net Trainer(MSCD | MCT | MS)
Brainbench (Asp.Net 4.5 and C# 5.0)

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ppathi on: 2/22/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Ques no:5

Using META tag inside your html <head> </head> element

Sample Code

<meta http-equiv="refresh" content="40" />

which means the page will refresh every 40 seconds

Thanks & Regards,
Pasupathi G
No Pain No Gain

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ppathi on: 2/22/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Ques no:15

System.Object is default dataType

Thanks & Regards,
Pasupathi G
No Pain No Gain

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ppathi on: 2/22/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Ques no: 13

Make Changes in web.config file we can achieve this, refer following link

http://www.eggheadcafe.com/community/visual-studio/7/10040209/how-to-restart-web-application-programmatically.aspx

Thanks & Regards,
Pasupathi G
No Pain No Gain

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 2/22/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
QNo: 14. It is in Windows Application.
Split date filed nad fill in the Combobox.
  dte = DateTime.Today;

string str = Convert.ToString(dte);
string [] sr = str.Split(' ' );
string fvalue = sr[0];
string[] splitdate = fvalue.Split ('/');
string mnt = splitdate[0];
string day = splitdate[1];
string year = splitdate[2];

comboBox1.Text = day;
comboBox2.Text = mnt;
comboBox3.Text = year;


Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 2/22/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
1. In a Load Balancing environment, Which way you choose to maintain state info, if security is important?

look at this
http://devcentral.f5.com/weblogs/dmacvittie/archive/2009/03/25/intro-to-load-balancing-for-developers-ndash-the-gotchas.aspx

http://technet.microsoft.com/en-us/library/bb734910.aspx

2. What Command Line Tools do we have in .net environment?
http://www.codeproject.com/Articles/17839/NET-Command-Line-Tools

3. What is the plugin architecture? how to use it?

http://www.codeproject.com/Articles/4691/Plugin-Architecture-using-C
http://www.nuclex.org/articles/5-cxx/4-building-a-better-plugin-architecture

4. What is the purpose of XSLT other than displaying XML contents in HTML?

http://www.w3.org/Style/XSL/WhatIsXSL.html

5. How to refresh a static HTML page?
<META http-equiv="refresh" content="60">


6. How to declare the XSLT document?
http://stackoverflow.com/questions/900261/how-to-declare-and-iterate-an-array-in-xslt

7. What are the data Islands in XML?
http://msdn.microsoft.com/en-us/library/windows/desktop/ms766512%28v=vs.85%29.aspx

8.Using ADO.NET Datareader a user extracted data from a database table having 5 records.What happens if another user adda 5 more
records to the table same time.Can the first user extracted records become 10 instead of 5 or will it remain same 5?
what about same case when ADO ? pls explain in detail.


Datasets, Datareader are offline objects. Unlike ado in ado.net , the application connect to the Db and disconnect , which means that if a another user add more 5 records , the one who retrieve the data earlier will not get the updated version until he requery the database again. a Datareader is a forward only record set and it will be updated when the query is ran agaist the DB again. In Ado the recordset was always connected to the DB even if it was not doing anything and this waste resources.

9. Using ADO.NET Datareader a user extracts data from a database table having 1000 rows.He closed his browser in between.
that is after fetching only 50 records. What happens to the Datareader?will it remain connected?
and will fetch 1000 records and what after? will garbage collector collect and dispose it soon?


if the page is closed , then the operation will be aborted and disposed

10. A user fetched dtata from a database table using Dataset(Disconnected records) for updation.
Another user deleted the table just after. what happens when the first user try to update the table after changes? Error or Something else?


That is concurrency , There are many ways of doing this. What you also can do is to check if any value of that record has changed , if it has alert the user and get the latest record and allow the user to update the newly retrieved records , i have done this in my previous articles
http://www.codeproject.com/Articles/27466/Coding-an-N-Tier-Application-in-C-Without-Any-Wiza

11. Where is session id stored in ASP? in IIS aerver or ASP Engine?

There are different places where sessions are stored it depends on the modes

http://msdn.microsoft.com/en-us/library/ms178586.aspx

12. What is the user in an asp.net application?

a user is someone who can login into your system and use your application , or anyone who can use your application. Your question is not clear.

13. How can you unload an asp.net app without touching the iis?

Create a Setup Project and it will do all the work for you.

http://weblogs.asp.net/scottgu/archive/2010/07/29/vs-2010-web-deployment.aspx


14. How to bind Three Different DropdownList Boxes?
i meen
first one --- Dropdown DAY
second------Dropdown month
thirdone-----DropDown Year
so i want to store date format in DateDataSource column.


This is called Cascading dropdownlist and they can be done as below

http://www.dotnetfunda.com/forums/thread2818-cascading-drop-down-issue.aspx

15. What is default datatype in .net?
i am not sure about this one , but i remember in vb it was variant, but i dont think c# will allow you to declare a variable without a type.

16. From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important?

http://msdn.microsoft.com/en-us/library/ms178472.aspx


14. How to bind Three Different DropdownList Boxes?
i meen
first one --- Dropdown DAY
second------Dropdown month
thirdone-----DropDown Year
so i want to store date format in DateDataSource column.


15. What is default datatype in .net?
i am not sure about this one , but i remember in vb it was variant, but i dont think c# will allow you to declare a variable without a type. i am not sure about this one , but i remember in vb it was variant, but i dont think c# will allow you to declare a variable without a type.

16. From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important?
http://msdn.microsoft.com/en-us/library/ms178472.aspx

17. What are ASHX files? What are HttpHandlers? Where can they be configured?
http://rameshdotnetinfo.blogspot.com/2011/08/what-are-ashx-files-what-are.html
http://www.justinrhinesmith.com/blog/2008/05/11/ashx-files-and-httphandlers/

18. What is needed to configure a new extension for use in ASP.NET? For example, what if I wanted my system to serve ASPX files with a *.jsp extension?


You need to add the Handler in IIS http://technet.microsoft.com/en-us/library/cc731285%28v=ws.10%29.aspx

19. What events fire when binding data to a data grid? What are they good for?
most of this Questions are available in goods



Thank you for posting at Dotnetfunda
[Administrator]

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 2/22/2012 [Member] Silver | Points: 25

Up
0
Down
Nice Reply by Administrator

Thanks,
Sanjay

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vishnupavadi on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
thank you very much to all, almost i got clear. because of you people support.
i got very good respond.

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Nice explain by Admin.

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Vishnupavadi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response