1.If someone can throw me a code snippet that populates 2 separate drop down lists controls from to different entities/tables on same view would be great. All I have done with views so far is have them created when adding new controller and it makes the
5 CRUD views.Just to give an idea how new mvc is to me.
2. Then please a simpke code snippet off 2 text boxes and a label(span) working together/
text1 will have int data type, and text box2 will have int datatype. then simply multiply text1's value to text2' s value and put that value in a label\span.
And is this better done client side in Jquery or C# or I can just take my pick?
Nebie - How to populate a view's text controls using the data set return by a stored procedure?
In EF can I make data sets for Entities using a sproc with result comming from Joined quieries. Like a virtual entity. And then I can populate the view controls using that data set?
Or better to just make that view in sqlserver and update EF model with that view.
Yes, I was watching the mvc tutorials until the OdeToFood video tutrial skipped so much that I nor many othesr (as I googled a solution to the gap in the video) could continue with it.
I do think this is a valid question:
"And is this better done client side in Jquery or C# or I can just take my pick"
I will just find another MVC forum if no one wants to help. I watched several videos, but I just had a coulpe questions a couple tiny code snippet requests to get started on a Worksheet view.
I will find a more helpful forum or maybe consider php.
The scaffolding in asp.net mvc is really great, but you should not rely on it and understand the basic concepts happening behind the scenes. Go do the tutorials (all of them) and learn about the dropdown list html helper and using select lists. Those are
easily populated from data that comes out of EF and 1 or 2 makes no difference once you have the basic understanding on how to extract data from EF and pass it to the view and then render the drop down.
So do the tutorials and learn about the basics, then you'll see that what you need is not difficult. Once you have tried a few things, come back here and post the code you tried and we will surely try to help you with any issues or problems that you run
into.
I was doing the tutorials along with them in my visual studios of corse. I did enough were I knew enough to start as I have all the data architecture constriants/indexes/tables/views/sproc/and functions. Once I learned how to get the data in I felt ready
to go since I am strong in T-SQL and Jquery/css (c# need to polish the rust off but it is there). The truth is I am past videos, I just should have googled for my questions becuase still to trivial to get answers. There are specific videos I will go and watch(of
corse code along with them) but I get the broad Idea. Need to start coding and that is what I have done just by looking at what the DBContect and Scaffolding code generators made. Just looking those have been enough, but thats and I will do what I normally
do use google as a resource and ask a forum when if really stumped or just want to know if there a "shorter way around the barn" on things.
Then I will gladly if the next couple come back and answer my own questions. I have found my questions are very good in the past as others have found the thread and used the solution.
So thanks for you feindly reply. And you got a lot of points!
Gzk2010
Member
136 Points
138 Posts
newbie -First custom view (not a scaffold Crud) created. How to fill text boxes from data from 2 ...
Jun 20, 2012 04:42 PM|LINK
Hi all, I know this so beginner.
1.If someone can throw me a code snippet that populates 2 separate drop down lists controls from to different entities/tables on same view would be great. All I have done with views so far is have them created when adding new controller and it makes the 5 CRUD views.Just to give an idea how new mvc is to me.
2. Then please a simpke code snippet off 2 text boxes and a label(span) working together/
text1 will have int data type, and text box2 will have int datatype. then simply multiply text1's value to text2' s value and put that value in a label\span.
And is this better done client side in Jquery or C# or I can just take my pick?
Thanks SO much is advance!!
Adam
Gzk2010
Member
136 Points
138 Posts
Nebie - How to populate a view's text controls using the data set return by a stored procedure?
Jun 20, 2012 04:51 PM|LINK
Hi again,
Nebie - How to populate a view's text controls using the data set return by a stored procedure?
In EF can I make data sets for Entities using a sproc with result comming from Joined quieries. Like a virtual entity. And then I can populate the view controls using that data set?
Or better to just make that view in sqlserver and update EF model with that view.
Thanks mucho,
Adam
CPrakash82
All-Star
18712 Points
2900 Posts
Re: Nebie - How to populate a view's text controls using the data set return by a stored procedu...
Jun 20, 2012 07:01 PM|LINK
Are you following any tutorials for this if not please refer the tutorials given on this site.
http://www.asp.net/mvc/tutorials
Thanks,
Gzk2010
Member
136 Points
138 Posts
Re: newbie -First custom view (not a scaffold Crud) created. How to fill text boxes from data fro...
Jun 21, 2012 04:21 PM|LINK
Yes, I was watching the mvc tutorials until the OdeToFood video tutrial skipped so much that I nor many othesr (as I googled a solution to the gap in the video) could continue with it.
I do think this is a valid question:
"And is this better done client side in Jquery or C# or I can just take my pick"
I will just find another MVC forum if no one wants to help. I watched several videos, but I just had a coulpe questions a couple tiny code snippet requests to get started on a Worksheet view.
I will find a more helpful forum or maybe consider php.
CodeHobo
All-Star
18669 Points
2648 Posts
Re: newbie -First custom view (not a scaffold Crud) created. How to fill text boxes from data fro...
Jun 21, 2012 05:08 PM|LINK
Don't just watch the videos, do the tutorials. Especially the mvc music store tutorials. They will teach you everything you need to know about.
http://www.asp.net/mvc/tutorials/mvc-music-store
http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/intro-to-aspnet-mvc-3
The scaffolding in asp.net mvc is really great, but you should not rely on it and understand the basic concepts happening behind the scenes. Go do the tutorials (all of them) and learn about the dropdown list html helper and using select lists. Those are easily populated from data that comes out of EF and 1 or 2 makes no difference once you have the basic understanding on how to extract data from EF and pass it to the view and then render the drop down.
So do the tutorials and learn about the basics, then you'll see that what you need is not difficult. Once you have tried a few things, come back here and post the code you tried and we will surely try to help you with any issues or problems that you run into.
Blog | Twitter : @Hattan
Gzk2010
Member
136 Points
138 Posts
Re: newbie -First custom view (not a scaffold Crud) created. How to fill text boxes from data fro...
Jun 21, 2012 08:10 PM|LINK
I was doing the tutorials along with them in my visual studios of corse. I did enough were I knew enough to start as I have all the data architecture constriants/indexes/tables/views/sproc/and functions. Once I learned how to get the data in I felt ready to go since I am strong in T-SQL and Jquery/css (c# need to polish the rust off but it is there). The truth is I am past videos, I just should have googled for my questions becuase still to trivial to get answers. There are specific videos I will go and watch(of corse code along with them) but I get the broad Idea. Need to start coding and that is what I have done just by looking at what the DBContect and Scaffolding code generators made. Just looking those have been enough, but thats and I will do what I normally do use google as a resource and ask a forum when if really stumped or just want to know if there a "shorter way around the barn" on things.
Then I will gladly if the next couple come back and answer my own questions. I have found my questions are very good in the past as others have found the thread and used the solution.
So thanks for you feindly reply. And you got a lot of points!