Support us MVC ASP.NET C# SQL Server WCF Written Test HR Round Subscribe C# Videos C# Programs Buy DVD

Techniques to send data from one web form to another web form


What are the different techniques to send data from one web form to another web form?
1. Query strings :
Use these strings to pass information between requests and responses as part of the Web address. Query strings are visible to the user, so they should not contain secure information such as passwords.

2. Cookies :
Use cookies to store small amounts of information on a client. Clients might refuse cookies, so your code has to anticipate that possibility.

3. Session state :
Use Session state variables to store items that you want keep local to the current session (single user).

4. Application state :
Use Application state variables to store items that you want be available to all users of the application.

13 comments:

  1. What is the best way to pass the information from one page to another page?

    ReplyDelete
    Replies
    1. Session is the best way to pass information across pages in a application...

      Delete
  2. There is one more way to pass the information from one webform to another webform:

    Define public properties in webform1 and access that using Context handler in webform2. This one is good in performance

    GB

    ReplyDelete
  3. Set 'PostBackURL' property of a control to postback page & in that page use 'PreviousPage.FindControl' method to extract postback data.

    ReplyDelete
  4. Windows Authentication - This is provided so that web pages can make use of the local Windows User and Groups.

    Forms Authentication - This is a cookie based authentication system where the username and passport is stored in a text file or a database. We will be focusing on this authentication model in this tutorial.

    ReplyDelete
  5. What is the best way to send large amount of data to another page.

    ReplyDelete
  6. the best way of sending the data by using session
    mode="sglserver" it an store more amount of data
    and prvoide security also

    ReplyDelete
  7. Cross Page Scripting, through XML , through SQL Server,etc.

    ReplyDelete
  8. we can post data from one page to another too

    ReplyDelete
  9. you can also use serverside cache or store data in database

    ReplyDelete
  10. i want to get data in li tag from database and set click event on it for transfer the webpage

    ReplyDelete

If you are aware of any other asp.net questions asked in an interview, please post them below. If you find anything missing or wrong, please feel free to correct by submitting the form below.

 
Disclaimer - Terms of use - Contact Us