F
fig000
Hi,
I'm new to the new asp.net . I've set up a web form with a grid
and an objectdatasource (in my presentation layer). I have a seperate
datalayer project which has webservices in it. I tell the
objectdatasource what my update method is by refering to a web service
method through a web reference in the presentation layer (The webmethod
IS my update method).
This almost works. What I've found is that the web service parameters
are all of the fields in the grid (including the pk) and an original
version of the pk is tacked on to the end of the paramaters. Before I
did this I was getting errors telling me that it couldn't find a
non-generic ..I'm sure you've all seen the error.
Once I got rid of that error by giving the web method the signature
the objectdatasource wanted, I still couldn't update data. I tried just
running the web service by itself which worked. However when I ran the
code (gridview and all) and checked the parameters coming into the
webservice, I found that the original version of the pk was zero. I
changed it in the debugger to the be same value of the pk parameter
being passed and I was able to save my changes.
I'm not sure what is wrong here. Is there a setting somewhere that
will pass the correct value of the original pk from the
objectdatasource to my web method?
Thanks,
Fig
Reply »
I'm new to the new asp.net . I've set up a web form with a grid
and an objectdatasource (in my presentation layer). I have a seperate
datalayer project which has webservices in it. I tell the
objectdatasource what my update method is by refering to a web service
method through a web reference in the presentation layer (The webmethod
IS my update method).
This almost works. What I've found is that the web service parameters
are all of the fields in the grid (including the pk) and an original
version of the pk is tacked on to the end of the paramaters. Before I
did this I was getting errors telling me that it couldn't find a
non-generic ..I'm sure you've all seen the error.
Once I got rid of that error by giving the web method the signature
the objectdatasource wanted, I still couldn't update data. I tried just
running the web service by itself which worked. However when I ran the
code (gridview and all) and checked the parameters coming into the
webservice, I found that the original version of the pk was zero. I
changed it in the debugger to the be same value of the pk parameter
being passed and I was able to save my changes.
I'm not sure what is wrong here. Is there a setting somewhere that
will pass the correct value of the original pk from the
objectdatasource to my web method?
Thanks,
Fig
Reply »