Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 11th, 2007, 08:51 AM
Registered User
 
Join Date: Sep 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default FormView Control

Please Anybody can help me with this problem that I am having in FormView Control.

<InsertItemTemplate>
                    <table style="width: 415px">
                    <tr bgcolor="#ffcc66">
                        <td align="right" style="width: 117px"><b>ContractorId:</b>
                        </td>
                        <td>
                            &nbsp;<asp:TextBox ID="InsertContractorIdTextBox"
                                         Text='<%# Bind("ContractorId") %>'
                                         RunAt="server" /></td>
                        <td>
                        </td>
                    </tr>
                    <tr bgcolor="#ffcc66">
                        <td align="right" style="width: 117px"><b>From Language:</b>
                        </td>
                        <td>
                            <asp:TextBox ID="InsertFromLanguageTextBox"
                                         Text='<%# Bind("FromLanguage") %>'
                                         RunAt="server" /></td>
                       <td>
                            &nbsp;<asp:DropDownList DataSourceID="SqlDataSourceLanguages" DataTextField="Language" ID="InsertFromLanguageDDBox" runat="server" DataValueField="Language_ID" Width="155px"></asp:DropDownList></td>
                    </tr>

                    <tr bgcolor="#ffcc66"><td align="right" style="width: 117px"><b>Into Language:</b></td>
                        <td><asp:TextBox ID="InsertIntoLanguageTextBox"
                                         Text='<%# Bind("IntoLanguage") %>'
                                         RunAt="server" /></td>
                                         <td>
                            &nbsp;<asp:DropDownList DataSourceID="SqlDataSourceLanguages" DataTextField="Language" ID="InsertIntoLanguageDDBox" runat="server" DataValueField="Language_ID" Width="155px">
                                         </asp:DropDownList></td>
                    </tr>
                    <tr bgcolor="#ffcc66">
                        <td align="right" style="width: 117px"><b>Service Type:</b></td>
                        <td><asp:TextBox ID="InsertServiceTypeTextBox"
                                         Text='<%# Bind("ServiceTypeId") %>'
                                         RunAt="Server" /></td>
                        <td>

                            <asp:DropDownList ID="DDListServiceType" runat="Server" DataSourceID="SqlDataSourceServiceType" DataTextField="ServiceName"
  DataValueField="ServiceTypeId" Width="157px" >
                            </asp:DropDownList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr bgcolor="#ffcc66"><td align="right" style="width: 117px"><b>Subject:</b></td>
                        <td><asp:TextBox ID="TextBox2"
                                         Text='<%# Bind("Subject") %>'
                                         RunAt="Server" /></td>
                                         <td>
                                         </td>
                    </tr>
                    <tr bgcolor="#ffcc66"><td align="right" style="width: 117px"><b>Desired Rate:</b></td>
                        <td><asp:TextBox ID="TextBox3"
                                         Text='<%# Bind("DesiredRate", "{0:c}") %>'
                                         RunAt="Server" /></td>
                                         <td>
                                         </td>
                    </tr>
                    <tr bgcolor="#ffcc66"><td align="right" style="width: 117px"><b>Desired Unit:</b></td>
                        <td><asp:TextBox ID="TextBox4"
                                         Text='<%# Bind("DesiredUnit", "{0:c}") %>'
                                         RunAt="Server" /></td>
                                         <td>
                                         </td>
                    </tr>
                    <tr bgcolor="#ffcc66"><td align="right" style="width: 117px"><b>Availability:</b></td>
                        <td><asp:TextBox ID="TextBox5"
                                         Text='<%# Bind("Availability") %>'
                                         RunAt="Server" /></td>
                                         <td>
                                         </td>
                    </tr>
                    <tr bgcolor="#ffcc66"><td align="right" style="width: 117px"><b>Period of Unavailability:</b></td>
                        <td><asp:TextBox ID="TextBox6"
                                         Text='<%# Bind("PeriodAvailable") %>'
                                         RunAt="Server" /></td>
                                         <td>
                                         </td>
                    </tr>
                    <tr bgcolor="#ffcc66"><td align="right" style="width: 117px"><b>Note:</b></td>
                        <td><asp:TextBox ID="TextBox7"
                                         Text='<%# Bind("Note") %>'
                                         RunAt="Server" /></td>
                                         <td>
                                         </td>
                    </tr>



                    <tr bgcolor="#ffcc66">
                      <td colspan="2">
                        <asp:LinkButton ID="InsertButton"
                                        Text="Insert"
                                        CommandName="Insert"
                                        RunAt="server"/>
                        &nbsp;
                        <asp:LinkButton ID="CancelInsertButton"
                                        Text="Cancel"
                                        CommandName="Cancel"
                                        RunAt="server"/>
                      </td>
                    </tr>
                  </table>
                </InsertItemTemplate>

Now When I try to Save the record I get Error as follows:

Disallowed implicit conversion from data type nvarchar to data type money, table 'dbo.ContractorsDetail', column 'DesiredRate'. Use the CONVERT function to run this query.

Ok Now. How do I convert String Value to Money in the BIND Property of the control.
Thank you.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a Panel control in FormView steve35719 ASP.NET 2.0 Basics 5 August 18th, 2010 12:32 AM
Capture and emaio formview control data nuttylife2 ASP.NET 1.x and 2.0 Application Design 0 August 1st, 2006 11:44 AM
Hide a Row in a FormView Control frosty ASP.NET 2.0 Basics 5 July 14th, 2006 03:07 PM
SqlDatasource filter using formview control tony_j_hug ASP.NET 2.0 Basics 2 October 17th, 2005 05:55 AM



All times are GMT -4. The time now is 07:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.