Click here to Skip to main content
15,921,295 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionUsing LightWeigt postback of asp.net2.0 for refreshing page Pin
sandeep kumar pundhir17-Apr-06 19:24
sandeep kumar pundhir17-Apr-06 19:24 
Questiontraversing through a treeview web control Pin
Kapil Thakur17-Apr-06 19:15
Kapil Thakur17-Apr-06 19:15 
AnswerRe: traversing through a treeview web control Pin
minhpc_bk17-Apr-06 20:05
minhpc_bk17-Apr-06 20:05 
AnswerRe: traversing through a treeview web control Pin
Kapil Thakur17-Apr-06 20:53
Kapil Thakur17-Apr-06 20:53 
GeneralRe: traversing through a treeview web control Pin
minhpc_bk17-Apr-06 23:27
minhpc_bk17-Apr-06 23:27 
QuestionAccess a BoundField's HeaderText through Script Pin
RX Maverick17-Apr-06 18:08
RX Maverick17-Apr-06 18:08 
AnswerRe: Access a BoundField's HeaderText through Script Pin
minhpc_bk17-Apr-06 19:21
minhpc_bk17-Apr-06 19:21 
Questionasp:CheckBox two-way binding problem Pin
FlorianS17-Apr-06 17:27
FlorianS17-Apr-06 17:27 
Hi I have a problem with binding parameters to an update command for an asp:SqlDataSource. The problem is when I am trying to bind a ASP:CheckBox field.
I have this definition
<asp:FormView ID="HomeListingForm"
runat="server"
DataSourceID="SqlHomeListing"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None"
BorderWidth="1px" CellPadding="3" CellSpacing="2" GridLines="Both"
DefaultMode="Edit"
>
<EditItemTemplate>
<table>
…………….
<tr>
<td >
<asp:CheckBox ID="ckMealsAvailable" Text="Meals Available" Checked ='<%# Convert.ToBoolean(Eval("MealsAvailable")) %>' runat="server" />
</td>
<td >
<asp:CheckBox ID="ckPrivateLivingArea" Text="Private Living Area" Checked ='<%# Convert.ToBoolean(Eval("PrivateLivingArea")) %>' runat="server" />
</td>
</tr>
</table>
---------
</asp:FormView>
<asp:SqlDataSource ID="SqlHomeListing" runat="server"
UpdateCommand ="UPDATE HomeListing SET AddressLine1 = @AddressLine1, AddressLine2 = @AddressLine2, City = @City, PostalCode=@PostalCode, ProvinceId = @ProvinceId, PrivateLivingArea = @private_living_area WHERE ListingId = @ListingId"
ConnectionString ="<%$ …….. %>" >
<UpdateParameters>
<asp:FormParameter Name="AddressLine1" Type="string" FormField="AddressLine1" DefaultValue =""/>
<asp:FormParameter Name="AddressLine2" Type="string" FormField="AddressLine2" DefaultValue = "" />
<asp:FormParameter Name="City" Type="string" FormField="City" DefaultValue =""/>
<asp:FormParameter Name="PostalCode" Type="String" FormField ="PostalCode" DefaultValue =""/>
<asp:FormParameter Name="ProvinceId" Type="Int32" FormField ="Province" DefaultValue ="0"/>
<asp:FormParameter Name="private_living_area" FormField ="ckPrivateLivingArea" Type="Int16" />
<asp:SessionParameter DefaultValue = "0" Name="ListingId" Type="String" SessionField="ListingId" />
</UpdateParameters>
</asp:SqlDataSource>
I am getting this error; Cannot insert the value NULL into column 'PrivateLivingArea', table 'RentalProperty.dbo.HomeListing'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
I know what it means but I can not figure out how to bind this checkbox field to the query parameters

AnswerRe: asp:CheckBox two-way binding problem Pin
minhpc_bk17-Apr-06 19:29
minhpc_bk17-Apr-06 19:29 
QuestionPrinting and formatting using datagrid--Urgent help needed Pin
DiptyMay17-Apr-06 13:10
DiptyMay17-Apr-06 13:10 
AnswerRe: Printing and formatting using datagrid--Urgent help needed Pin
goyal manish18-Apr-06 4:39
goyal manish18-Apr-06 4:39 
QuestionHow do create an Admin page that has the same functionality as "Security" tab in 'ASP.NET configuration tool'? Pin
Slow Learner17-Apr-06 10:24
Slow Learner17-Apr-06 10:24 
AnswerRe: How do create an Admin page that has the same functionality as "Security" tab in 'ASP.NET configuration tool'? Pin
Mike Ellison17-Apr-06 14:01
Mike Ellison17-Apr-06 14:01 
QuestionASP.NET Application Deployment Pin
pgoutia17-Apr-06 6:24
pgoutia17-Apr-06 6:24 
AnswerRe: ASP.NET Application Deployment Pin
Jon Sagara17-Apr-06 6:27
Jon Sagara17-Apr-06 6:27 
GeneralRe: ASP.NET Application Deployment Pin
pgoutia17-Apr-06 6:35
pgoutia17-Apr-06 6:35 
GeneralRe: ASP.NET Application Deployment Pin
Braulio Dez17-Apr-06 7:22
Braulio Dez17-Apr-06 7:22 
Questionlearning Crystal Report Pin
ptvce17-Apr-06 5:51
ptvce17-Apr-06 5:51 
AnswerRe: learning Crystal Report Pin
Mike Ellison17-Apr-06 6:22
Mike Ellison17-Apr-06 6:22 
Questionvs2005 page events for c# Pin
the pink jedi17-Apr-06 5:43
the pink jedi17-Apr-06 5:43 
AnswerRe: vs2005 page events for c# Pin
ToddHileHoffer17-Apr-06 5:57
ToddHileHoffer17-Apr-06 5:57 
AnswerRe: vs2005 page events for c# Pin
minhpc_bk17-Apr-06 16:39
minhpc_bk17-Apr-06 16:39 
QuestionProblem with Response.Write and Theme Pin
MightyJoe17-Apr-06 5:32
MightyJoe17-Apr-06 5:32 
AnswerRe: Problem with Response.Write and Theme Pin
Guffa17-Apr-06 6:10
Guffa17-Apr-06 6:10 
GeneralRe: Problem with Response.Write and Theme Pin
MightyJoe17-Apr-06 8:47
MightyJoe17-Apr-06 8:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.