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

Top 5 Contributors of the Month
Gaurav Pal

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

how to pass the values across webforms without using State Management Concepts:

Posted By :Mallikarjuna Chigicherla     Posted Date :August 04, 2010    Points :10   Category :ASP.Net 

public String CurrentCity
return TextBox1.Text;

In Page2.aspx

<%@ PreviousPageType VirtualPath="~/Page1.aspx" %>


Another Method:

In Page2.aspx

TextBox SourceTextBox = (TextBox)PreviousPage.FindControl("TextBox1");

Label1.Text = SourceTextBox.Text;

You can also find related Interview Question to how to pass the values across webforms without using State Management Concepts:  below: 

What is Profile Based State in ASP State Management ?

A profile based state is nothing but the state changes is saved permanently for a particular profile. That means the state is saved manually by the user. If there was no saving done the Default settings will be applied .

For Example .
If we login into igoogle.com, there if we have our customized page set once, untill and unless we change it delibrately it will be the same page. (More...)

What are the different state management techniques used in asp.net for web applications?

In ASP.Net the state can be maintained in following ways
Server-side state management
Application objects
Session Variables
Client-side state management
Hidden input fields
Query String
ViewState (More...)

what are the different state management techniques in ASP.Net?

Asp.Net state management can be maintained in two ways as below
Client- Side State Management
ASP.Net provides following techniques to store state information. This will improve application performance by minimizing server resource utilization
1.View state
2. Hidden Fields
3. Cookies
4. Query Strings
Server - Side State Management
With respect to Server Side State Management ASP.Net uses "Application state" and "Session state" objects to store data or user state.

Read more: asp.net interview questions and answers | Introduction | FreeJobAlert.com http://www.freejobalert.com/explain-the-advantages- (More...)

State Management in ASP.NET

State Management
Type of state management in ASP.NET
1.InProc(Where session objects stored wit in IIS server)
2.OutProc(Where session objects store out of the server
a.State Server(where session objects can store in different server)
b.SQL server(where session objects can store in SQL server)

This can be configure in web.config file . (More...)

What are the client-side state management technique supported by ASP.NET?

Control state

View state


Hidden fields

Query strings (More...)

What are the OOPS concepts?

1) Encapsulation: It is the mechanism that binds together code and data in manipulates, and keeps both safe from outside interference and misuse. In short it isolates a particular code and data from all other codes and data. A well-defined interface controls the access to that particular code and data.

2) Inheritance: It is the process by which one object acquires the properties of another object. This supports the hierarchical classification. Without the use of hierarchies, each object would need to define all its characteristics explicitly. However, by use of inheritance, an object need only define those qualities that make it unique within its class. It can inherit its general attributes from its parent. A new sub-class inherits all of the attributes of all of its ancestors.

3) Polymorphism: It is a feature that allows one interface to be used for general class of actions. The specific action is determined by the exact nature of the situation. In general polymorphism means "one interface, multiple methods", This means that it is possible to design a generic interface to a group of related activities. This helps reduce complexity by allowing the same interface to be used to specify a general class of action. It is the compiler's job to select the specific action (that is, method) as it applies to each situation. (More...)

Session state vs View state

In some cases, using view state is not feasible. The alternative for view state is session state. Session state is employed under the following situations:
. Large amounts of data - View state tends to increase the size of both the HTML page sent to the browser and the size of form posted back. Hence session state is used.
. Secure data - Though the view state data is encoded and may be encrypted, it is better and secure if no sensitive data is sent to the client. Thus, session state is a more secure option.
. Problems in serializing of objects into view state - View state is efficient for a small set of data. Other types like DataSet are slower and can generate a very large view state (More...)

How do I call a member method and pass a primitive type (Value Type) by reference?

Use the ref keyword when declaring the parameter of the method, for example:

public bool GetValue( ref int returnValue );

This will pass the numeric by reference.You can modify the value of returnValue within the body of GetValue and it will persist when the method call returns. (More...)

What is Automatic Memory Management in ASP.NET?

Automatic Memory Management: From a programmer's perspective, this is probably the single biggest benefit of the .NET Framework. No, I'm not kidding. Every project I've worked on in my long career of DOS and Windows development has suffered at some point from memory management issues. Proper memory management is hard. Even very good programmers have difficulty with it. It's entirely too easy for a small mistake to cause a program to chew up memory and crash, sometimes bringing the operating system to a screeching halt in the process.

Programmers understand that they're responsible for releasing any memory that they allocate, but they're not very good at actually doing it. In addition, functions that allocate memory as a side effect abound in the Windows API and in the C runtime library. It's nearly impossible for a programmer to know all of the rules. Even when the programmer follows the rules, a small memory leak in a support library can cause big problems if called enough.

The .NET Framework solves the memory management problems by implementing a garbage collector that can keep track of allocated memory references and release the memory when it is no longer referenced. A large part of what makes this possible is the blazing speed of today's processors. When you're running a 2 GHz machine, it's easy to spare a few cycles for memory management. Not that the garbage collector takes a huge number of cycles--it's incredibly efficient.
The garbage collector isn't perfect and it doesn't solve the problem of mis-managing other scarce resources (file handles, for example), but it relieves programmers from having to worry about a huge source of bugs that trips almost everybody up in other programming environments.
On balance, automatic memory management is a huge win in almost every situation. (More...)

Which typically consumes more memory: application state or session state?

Session state tends to use much more memory than application state, because copies of all variables are stored for each user. (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