I am new to dynamic data and .NET 3.5. I do not see any code behind files in the project. I was just wondering if there is any way to do some other functionality once I click on the Insert link button? Suppose,I need to update another table once insert is
clicked, based on the values being inserted in first table.Is there any way to do it? Also,is there any way to access the values being inserted into the table? Please give some suggestions.
Thanks for the reply.I am sorry for the question.I didn't notice that it is present in the project. I imported a folder containing dynamic data code into my project but there were no .cs files so I thought it's not present in this structure.
Yes,I did.Thanks once again.However, it was weird that .cs files were not present in an exisiting dynamic data project.I guess the guys deleted the .cs files.
I apologize for reopening the thread.However, I am unable to access the values being inserted into the table using dynamic data in VWD 2010. I am not sure what has to be done. I need to update another table once the insert link is clicked, based on the values
being inserted in first table.Is there any way to do it? Please give some suggestions.
u can use a storedprocdure for this..
first insert the value in db and then update the other table in the same storedproc
Thanks for the reply.I do not know how to use a stored procedure in this case.Do I need to create a new class file and write stored procedure in there? I see that the values are getting inserted into the Insert.aspx.cs page. How do I get the values which
I need to insert into the db?
no no stored procedures are writtem in database.
we will pass the value to the storedproc as a paramater and then we can use those values..
see this link..
http://www.google.co.in/search?aq=0&oq=insert+using+stored&sourceid=chrome&ie=UTF-8&q=insert+using+stored+procedure+in+asp.net
if i get the time i will upload a sample project for ur understanding..
we will pass the value to the storedproc as a paramater and then we can use those values
Thanks once again for the reply.While I was looking at how to write stored procedures,I was just wondering that how do I obtain the values to be inserted into the db from the front end.I mean in order to pass values to the stored proc,I need to get those
values from the front end.
simpleguy
Member
14 Points
91 Posts
How to do an update on an insert operation using dynamic data
Jul 07, 2010 03:09 PM|LINK
Hello All,
I am new to dynamic data and .NET 3.5. I do not see any code behind files in the project. I was just wondering if there is any way to do some other functionality once I click on the Insert link button? Suppose,I need to update another table once insert is clicked, based on the values being inserted in first table.Is there any way to do it? Also,is there any way to access the values being inserted into the table? Please give some suggestions.
Thanks.
sjnaughton
All-Star
27308 Points
5458 Posts
MVP
Re: How to do an update on an insert operation using dynamic data
Jul 07, 2010 06:17 PM|LINK
Hi Simpleguy, I'm not sure I follow you as every page an user control has a code behind in both web site template and web application projects [:(]
Dynamic Data
Always seeking an elegant solution.
simpleguy
Member
14 Points
91 Posts
Re: How to do an update on an insert operation using dynamic data
Jul 08, 2010 04:16 AM|LINK
Thanks for the reply.I am sorry for the question.I didn't notice that it is present in the project. I imported a folder containing dynamic data code into my project but there were no .cs files so I thought it's not present in this structure.
sjnaughton
All-Star
27308 Points
5458 Posts
MVP
Re: How to do an update on an insert operation using dynamic data
Jul 08, 2010 09:55 AM|LINK
No probs, at first I though you were confusing MVC (as MVC has no code behind on it views) and DD.
Glad your sorted [:)]
Dynamic Data
Always seeking an elegant solution.
simpleguy
Member
14 Points
91 Posts
Re: How to do an update on an insert operation using dynamic data
Jul 08, 2010 03:01 PM|LINK
Yes,I did.Thanks once again.However, it was weird that .cs files were not present in an exisiting dynamic data project.I guess the guys deleted the .cs files.
simpleguy
Member
14 Points
91 Posts
Re: How to do an update on an insert operation using dynamic data
Jul 12, 2010 03:28 PM|LINK
Hello All,
I apologize for reopening the thread.However, I am unable to access the values being inserted into the table using dynamic data in VWD 2010. I am not sure what has to be done. I need to update another table once the insert link is clicked, based on the values being inserted in first table.Is there any way to do it? Please give some suggestions.
Thanks.
vishwaraj1
Contributor
3687 Points
861 Posts
Re: How to do an update on an insert operation using dynamic data
Jul 12, 2010 03:38 PM|LINK
u can use a storedprocdure for this..
first insert the value in db and then update the other table in the same storedproc
Vishwaraj Malik
Skype ID: vishwaraj.malik
VB to C# Converter
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
simpleguy
Member
14 Points
91 Posts
Re: How to do an update on an insert operation using dynamic data
Jul 12, 2010 03:47 PM|LINK
Thanks for the reply.I do not know how to use a stored procedure in this case.Do I need to create a new class file and write stored procedure in there? I see that the values are getting inserted into the Insert.aspx.cs page. How do I get the values which I need to insert into the db?
vishwaraj1
Contributor
3687 Points
861 Posts
Re: How to do an update on an insert operation using dynamic data
Jul 12, 2010 05:15 PM|LINK
Vishwaraj Malik
Skype ID: vishwaraj.malik
VB to C# Converter
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
simpleguy
Member
14 Points
91 Posts
Re: How to do an update on an insert operation using dynamic data
Jul 12, 2010 07:01 PM|LINK
Thanks once again for the reply.While I was looking at how to write stored procedures,I was just wondering that how do I obtain the values to be inserted into the db from the front end.I mean in order to pass values to the stored proc,I need to get those values from the front end.