0x800a138f - JavaScript runtime error: Unable to get property 'value' of undefined or null reference

Hi Experts
i am using Obout component Master and Detail grid, and its working perfectly in ASP.net Web site, recently i created ASP.net Web Application using the same functionality from web site, and its working when i try to add record in the master grid, but when i try to add a record in the detail grid i am getting an error

0x800a138f - JavaScript runtime error: Unable to get property 'value' of undefined or null reference

when adding record in in detail grid i am taking CPRNo from grid as a default number using this javascrip function
 function onPopulateControls(sender, record) {
            record.cprno = sender.ForeignKeys.cprno.value;

            return record;

Open in new window

this function was working in ASP.Net web site but ASP.net web application its giving me an error

the content of aspx page
<Obout:Grid ID="Grid1" runat="server" DataSourceID="SqlDataSource1" >
            <MasterDetailSettings LoadingMode="OnCallback" ShowEmptyDetails="true"/>
                <Obout:DetailGrid ID="Grid2" runat="server" DataSourceID="SqlDataSource2" ForeignKeys="cprno" AutoGenerateColumns="false" >
                   <ClientSideEvents ExposeSender="true" OnClientPopulateControls="onPopulateControls" />
                        <obout:Column DataField="cprno" HeaderText="cprno" ReadOnly="true" Visible="false"></obout:Column>                        
                        <obout:Column DataField="CarNo" HeaderText="CarNo" Width="100"></obout:Column>
                        <obout:Column DataField="CarColor" HeaderText="CarColor" Width="100"></obout:Column>
                        <obout:Column DataField="Company" HeaderText="Company" Width="200"></obout:Column>                        
                        <obout:Column DataField="" HeaderText="" AllowEdit="true" AllowDelete="true" Width="100" Align="center"></obout:Column>
                    <MasterDetailSettings LoadingMode="OnCallback"  />

Open in new window

note that i am using Foreign Key CPRNo
i tried to contact Obout support team but i am not getting any reply, i think this company stooped

please help me
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
Same question posted here, for reference, if an answer is found:


It is tough to say what the status of a web site is.  One clue might be that the domain expired on Feb 2015:


Expires On          February 04, 2015
Registered On    March 05, 2000
Updated On       January 30, 2014

I don't have any experience with obout.

What is null in this case?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AZZA-KHAMEESAuthor Commented:
thank you for the reply
the null is the value of cprno

Open in new window

Bob LearnedCommented:
I wonder if it is case-sensitive, and it should be CPRNo instead of cprno...
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

AZZA-KHAMEESAuthor Commented:
no its not
i tried to remove .Value and it work but it return empty value

my major question is, why that the application was working fine when it was ASP.net web site and when i changed it to ASP.net web application i am getting this error?
Bob LearnedCommented:
That is the question of the day...how did you change from Web Site model to Web Application model?  Did the process change anything in the web.config?
AZZA-KHAMEESAuthor Commented:
i created a new web application and then i modified the pages by adding the same functionality.
Bob LearnedCommented:
What version of Visual Studio are you using?  There is a menu option for converting a Web Site project to a Web Application project.
AZZA-KHAMEESAuthor Commented:
i am using Visual studio 2012
Bob LearnedCommented:
I believe that 2012 should have that option.  Do you still have the Web Site model code base?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.