Click here to Skip to main content
15,890,512 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralBest way to implement "Continue shopping" Pin
AlexeiXX328-Feb-08 18:58
AlexeiXX328-Feb-08 18:58 
GeneralRe: Best way to implement "Continue shopping" Pin
eyeseetee28-Feb-08 21:35
eyeseetee28-Feb-08 21:35 
GeneralFormView Paging Pin
kenexcelon28-Feb-08 17:26
kenexcelon28-Feb-08 17:26 
GeneralRe: FormView Paging Pin
kenexcelon29-Feb-08 11:40
kenexcelon29-Feb-08 11:40 
GeneralWhat's the right place to find a cool programmer Pin
borntodeal28-Feb-08 12:36
borntodeal28-Feb-08 12:36 
GeneralRe: What's the right place to find a cool programmer Pin
Not Active28-Feb-08 13:11
mentorNot Active28-Feb-08 13:11 
GeneralRe: What's the right place to find a cool programmer Pin
Amol M Vaidya28-Feb-08 16:38
professionalAmol M Vaidya28-Feb-08 16:38 
GeneralPlease help with these questions Pin
A.Asif28-Feb-08 12:16
A.Asif28-Feb-08 12:16 
Hello- Please help me with the following questions, if possible,
please also provide some explanations--thanks in advance:

1) Assuming that "valid connection string" is a valid connection string, what will be the output of the following code? If the code cannot compile, please state why.
the same rules apply to this question as for the one above
using(SqlConnection sqlConn = new SqlConnection("valid Connection string"))
{
System.Diagnostics.Debug.WriteLine("Opening a connection");
sqlConn.Open();
System.Diagnostics.Debug.WriteLine("Connection Opened");
sqlConn.Close();
System.Diagnostics.Debug.WriteLine("Connection Closed");
}

if(sqlConn == null)
System.Diagnostics.Debug.WriteLine("Connection State is NULL");
else
System.Diagnostics.Debug.WriteLine("Connection State:" + sqlConn.ConnectionState);



2)The following code needs to generate a string of 1000 alternating '+' and '-' characters
Rewrite this code to make it more efficient (Note: You can use different data types than the ones present)

string htmlOutput = string.Empty;
for(int itemIndex = 0; itemIndex < 1000; itemIndex++)
{
if( itemIndex % 2 == 0)
htmlOutput += "+";
else
htmlOutput += "-";
}



3)Assuming that CustomException is defined, what will be the output of the following code?
try
{
throw new CustomException("Something went wrong");
}
catch(Exception ex)
{
System.Diagnostics.Debug.WriteLine("Generic Exception has been triggered");
}
catch(CustomException ex)
{
System.Diagnostics.Debug.WriteLine("Custom Exception has been triggered");
}




4) What will be the difference in behavior between the lines marked 'a' and 'b' during runtime? (Assume that CustomClass is a defined class)


object objClass = new object();

CustomClass myClass1 = objClass as CustomClass; //a
CustomClass myClass2 = (CustomClass)objClass; //b



5) Assuming you have the following class:

public class MyClass
{
public MyClass()
{
}

public string DoNothing(string someParameter)
{
System.Diagnostics.Debug.WriteLine(someParameter);
}
}

How would you call the DoNothing function asynchronously and provide a callback?


6) What is the difference between a Monitor and a Semaphore?



7) Architectural Question: If you have pages that perform heavy DB or File I/O, what could be done to help increase the overall performance of the application? (Asp.net only! Assume all non asp.net factors have been optimized to the max)


8) What is the difference between the following 2 statements?

try
{
throw new ApplicationException("None");
}
catch(Exception ex)
{
throw ex;
}


try
{
throw new ApplicationException("None");
}
catch(Exception ex)
{
throw;}
9) What is the difference between a List and a LinkedList?


10) Assume that you retrieve a list of 1,000,000 Person objects from a database that contain the SocialSecurityID, First and Last name properties. Which collection class would you use to store and allow for quick lookup of Person objects based on the SocialSecurityID field?






















A.Asif

A.Asif

GeneralJob search questions or class assignment? Pin
Not Active28-Feb-08 12:20
mentorNot Active28-Feb-08 12:20 
GeneralRe: Please help with these questions Pin
Christian Graus28-Feb-08 12:30
protectorChristian Graus28-Feb-08 12:30 
GeneralRe: Please help with these questions Pin
Guffa28-Feb-08 13:31
Guffa28-Feb-08 13:31 
GeneralRe: Please help with these questions Pin
Vasudevan Deepak Kumar29-Feb-08 19:26
Vasudevan Deepak Kumar29-Feb-08 19:26 
GeneralDatetime problem Pin
eyeseetee28-Feb-08 5:04
eyeseetee28-Feb-08 5:04 
GeneralRe: Datetime problem Pin
ChrisKo28-Feb-08 5:37
ChrisKo28-Feb-08 5:37 
Generalrefresh button as a hyperlink Pin
eyeseetee28-Feb-08 4:24
eyeseetee28-Feb-08 4:24 
GeneralRe: refresh button as a hyperlink Pin
eyeseetee28-Feb-08 4:50
eyeseetee28-Feb-08 4:50 
GeneralRe: refresh button as a hyperlink Pin
Not Active28-Feb-08 12:34
mentorNot Active28-Feb-08 12:34 
GeneralRe: refresh button as a hyperlink Pin
Amol M Vaidya28-Feb-08 16:48
professionalAmol M Vaidya28-Feb-08 16:48 
GeneralRe: refresh button as a hyperlink Pin
eyeseetee28-Feb-08 21:20
eyeseetee28-Feb-08 21:20 
Generalfaster or better approach of filling data to dropdownlist Pin
mohd imran abdul aziz28-Feb-08 4:20
mohd imran abdul aziz28-Feb-08 4:20 
GeneralRe: faster or better approach of filling data to dropdownlist Pin
Guffa28-Feb-08 4:44
Guffa28-Feb-08 4:44 
GeneralRe: faster or better approach of filling data to dropdownlist Pin
N a v a n e e t h28-Feb-08 14:55
N a v a n e e t h28-Feb-08 14:55 
GeneralRe: faster or better approach of filling data to dropdownlist Pin
Guffa28-Feb-08 19:43
Guffa28-Feb-08 19:43 
GeneralRe: faster or better approach of filling data to dropdownlist Pin
ChrisKo28-Feb-08 5:34
ChrisKo28-Feb-08 5:34 
GeneralMembership access rules not working Pin
Richard Jones28-Feb-08 4:07
Richard Jones28-Feb-08 4:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.