.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

How can you find ComputerName of the client in ASP.net ?

Posted By :Shashi Ray     Posted Date :December 09, 2009    Points :10   Category :.NET Framework 
string ComputerName = WindowsIdentity.GetCurrent().Name.ToString();

You can also find related Interview Question to How can you find ComputerName of the client in ASP.net ?  below: 

How can you find IP address of the client in ASP.net ?

  
string clientIPAddress = Request.UserHostAddress.ToString(); (More...)

Should validation (did the user enter a real date) occur server-side or client-side? Why?

  
Validation will be done in both sides i.e., at the server side and client side. Server side validation will be done even though client side validation performed on the code because of proper
security reasons. (More...)

What type of code (server or client) is found in a Code-Behind class?

  
Server-side code since code-behind is executed on the server. However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser. But just to be clear, code-behind executes on the server, thus making it server-side code. (More...)

By Default, ASP.NET does not allow HTML tags to be sent to server via client side due to security reason. Which property needs to be set that allows HTML tags to be processed by server?

  
ValidateRequest Property needs to be set to false. By default it's true so it does not allow unencoded HTML tags to be processed at server. It can be set at page level or at application level via web.config. (More...)

Should user input data validation occur server-side or client-side? Why?

  
All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user. (More...)

Difference between Server-Side AJAX framework and Client-side AJAX framework?

  
ASP.NET AJAX contains both a server-side Ajax framework and a client-side Ajax framework. The server-side framework provides developers with an easy way to implement Ajax functionality, without having to possess much knowledge of JavaScript. The framework includes server controls and components and the drag and drop functionality. This framework is usually preferred when you need to quickly ajaxify an asp.net application. The disadvantage is that you still need a round trip to the server to perform a client-side action.
The Client-Side Framework allows you to build web applications with rich user-interactivity as that of a desktop application. It contains a set of JavaScript libraries, which is independent from ASP.NET. The library is getting rich in functionality with every new build released. (More...)

How can we find the open transactions details in sql server?

  
Yes, it is possible.

select * from sysprocesses where open_tran > 0


This query will provide list of all the open transaction details. (More...)

How to Find Number of Days for provided date range?

  
Code extract :

TimeSpan DayDifference = Convert.ToDateTime("2009-1-7").Subtract(Convert.ToDateTime("2009-1-1"));


To find the difference of the days, here we have used Subtract method. The Subtract method does not take start date into consideration. Hence, to get the exact number of days for the date range we need to add one more day to the result.

Response.Write("Number of Days : " + DayDifference.Days+1); (More...)

How to find data with generics list in VB.NET (Write code).

  
In the code example below, the function "FindData" will return list("sublist") of the objects having matchingKey same as viewstate value.
Dim sublist As List(Of MyClass)
sublist = allClient.FindAll(AddressOf FindData) 'sublist will contain objects matching specified matching condition

Function FindData(ByVal b As MyClass) _
As Boolean
If (b.matchingKey = CInt(ViewState("matchingKey "))) Then 'matching condition
Return True
Else
Return False
End If
End Function (More...)

If cookies is disabled in client browser will session work ?

  
If cookieless is true it will work. If it is not, it won't work. (More...)

How can you find DateTime in ASP.net?

  
DateTime now = System.DateTime.Now; (More...)

How can you find CurrentDate in ASP.net?

  
string c_date = DateTime.Today.ToString("dd/MM/yyyy"); (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend