While adding arrays to viewbag.....first we need to create array obj...string[ ] obj = new string[ size]; But you have not written above code and you have done it directly....Can you please expain mam..how you have given vales to array without creating obj............Thank u..
If you observed it carefully, I created instance of it, but i didn't specify object name new string[ ] { "red", "green", "blue" } 'new' keyword is used to create object. Since array is initialized with values memory will allocated for number of element that are initialized.
Hi Mam I tried below code ViewBag.ID = Convert.Int32(Request ["id"]); Passing a id value as 1 from URL example: localhost://employee/1 When I run app displayed with 0 In cshtml file I wrote as @ViewBag.ID . can you please reply
Hi Avinash, Thanks for watching video. You have to use RouteData.Values["id"] instead of Request["id"] because it is a Route Parameter and not a Querystring. I'll also suggest you to watch following video to collect the Request value : Collecting Request values in Action Method in asp.net mvc : bit.ly/3ddXHVx
This is the simplest explanation I have seen on TH-cam so far. Great job ma.
I know it is kinda off topic but does anybody know of a good website to stream new series online ?
the way you conclude all the concepts at the end is really good to get the summary and to remember all the things....thanks
Mam your explanation is very good. You deserves millions views.
Very clean explanation 👍. Thank you
Good explanation
quite informative
Hi...Very Nicely Explained the concepts. Thanks !!!
Thank you
learn a lot
Can we store session in sql in mvc? How?
really good
Thanks!
can i get this code ???
While adding arrays to viewbag.....first we need to create array obj...string[ ] obj = new string[ size];
But you have not written above code and you have done it directly....Can you please expain mam..how you have given vales to array without creating obj............Thank u..
If you observed it carefully, I created instance of it, but i didn't specify object name
new string[ ] { "red", "green", "blue" }
'new' keyword is used to create object.
Since array is initialized with values memory will allocated for number of element that are initialized.
Hi Mam I tried below code
ViewBag.ID = Convert.Int32(Request ["id"]);
Passing a id value as 1 from URL example: localhost://employee/1
When I run app displayed with 0
In cshtml file I wrote as
@ViewBag.ID . can you please reply
Hi Mam can you reply back to my doubt above
Hi Avinash, Thanks for watching video.
You have to use RouteData.Values["id"] instead of Request["id"] because it is a Route Parameter and not a Querystring.
I'll also suggest you to watch following video to collect the Request value :
Collecting Request values in Action Method in asp.net mvc : bit.ly/3ddXHVx
Thanks for reply mam ,also can you send me your email address and any Best C# tutorial series or websites to Master
hi Mam can you reply