Techniques to send data from one webform to another in asp.net Part 58

preview_player
Показать описание
Text version of the video

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.

Slides

All ASP .NET Text Articles

All ASP .NET Slides

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

Different techniques to move data from one webform to another
1. Cross Page Postback: Discussed in Part 55 and Part 56
2. Context.Handler object - Will be discuss in this video session.

The following concepts will be discussed in the subsequent sessions
3. Query strings
4. Cookies
5. Session state
6. Application state

In general, the members of one Web form are unavailable from a subsequently displayed Web form. However, when navigating between Web forms using the Transfer or Execute method, data can be retrieve from the previous Web form using Context.Handler object.

Points to remember Context.Handler object
1. Context.Handler returns WebForm1 as the previous page, only the first time when you land on WebForm2 from WebForm1. If there is a button on WebForm2, and if you click the button, the page will postback, and Context.Handler will return WebForm2 instead of WebForm1.
2. For the Context.Handler to return WebForm1 as the previous page, you should have landed on WebForm2, using Server.Transfer or Server.Execute method from WebForm1.
3. The control values from the previous page, can be accessed using FindControl() method or using public properties. The problem with FindControl() method is that, if you mis-spell the ControlID, we could get a runtime NullRefernceException. Using public properties, instead of FindControl() method, can eliminate runtime NullRefernceExceptions.
Рекомендации по теме
Комментарии
Автор

Hi Harika, yes they both mean the same. This question can be asked in different ways. Since web applications work on state less protocol, there are a variety of techniques to maintain start across postbacks, and between pages in an application. I hope this answers your question. Good Luck.

Csharp-video-tutorialsBlogspot
Автор

Great video ! You've personally made my learning experience nothing but successful; Still have a lot to learn but thankfully there's you !

rodriguempagazihe
Автор

Thanks you are A creative person with a distinctive style in communicating information and I benefited greatly from your lessons Thank you very much

pfywsrh
Автор

Hi Thanks for the feedback. No you shouldn't need any special permissions. These are free tutorials to help students and job seekers. From which country are you accessing? Is it just this video? or is it the same case with every video in this video series.

Csharp-video-tutorialsBlogspot
Автор

By casting to a specific page, you have indeed removed the possibility of typos. But you have also hardwired that form2 beeds to be called by form1, so you've just tightly-coupled the two pages. Don't get me wrong, this series of videos is brilliant, but you could have made it clear that, by doing it this way, you've made a definite choice which has both upsides and downsides.

scaywagg
Автор

Thank you very much Venkat. I just have one question. Why can't we use PreviousPage property as you did in previous video?

jiner
Автор

Hi, I think the problem is with youtube. I am not able to access the other videos as well, not only my videos. However, the embedded videos on my blog are working. Wait for sometime, and hopefully google will fix the youtube issue.

Csharp-video-tutorialsBlogspot
Автор

Thank you kudvenkat! It worked like a charm.

ovuokeaghwotu
Автор

hey...thanks for the tutorial...problem in my case is that after running the project it is showing NullreferenceException was not handled by user code so plzz help me out

kushagrabhardwaj
Автор

hello thanks for the straight forward tutorial..
im struggling with a similar thing, like if my webform 1 had objects like dropdown list, textbox and a listbox how would i transfer the objects to my webform 2, and i want them to be disabled thank you

maureensemadi
Автор

Hi venkat, could you please uploads the Video series on JQuery, Ajax, Javascript with practical examples. I have watched almost all videos which you have uploaded on ASP.Net

AmitKumar-ozyt
Автор

Hi Venkat, I didn't understand something, you said that the Context.Handler is a property of type IHttpHandler, that the class Page implements IHttpHanlder therefore "whatever thing that Context.Hanlder returns can be casted as a Page object", Is it correct? I think that that statement is incorrect; if Context.Handler returned a Page object, It would be casted as like a Page object or IHttpHandler interface

emmanuelgarciadesant
Автор

When we use payment gateway and we want to generate invoice with client details so which concept is best for data transfer securely?

buntysoni
Автор

You responsed so quickly, which suprised me. Thanks for that. I have been following you video, I am at video 14 asp.net. I love that. I can watch others videos, but not yours, today. Very annoying. Do you have these video at other place?

potatolittle
Автор

thats a nice lesson. we can transfer data from one page to other bt context.Handler.

Is it possible to transfer data from two or more webforms to other new web form??

Reply me Please??

prakashsai
Автор

hi venkat,
what are state management techniques ?sending data from one page to another page and state management techniques are one and the same...this qtn is asked in my interview

harikaaakutota
Автор

Venkat,
I don't know if you are replying to any more questions or not. But I still wanted ask you. How do you compare context.handler vs page.previouspage vs Request obj. They all do almost the same things. Please explain. I am so confused !!!
thanks in advance.
Ramya

Void_YT
Автор

am having one doubt in this context.handler is fine... but why cant we use previouspage property which will also holds previous page data members like we used in previos videos??

sismail
Автор

It shows the same webform1.aspx.. It doesn't show webform2.aspx in url when you click the button...

Spdroo
Автор

Thank's your videos..! I have a question! If radio button or check box ...! I can send data it like? Please help me!

vietkhanhnguyen