ASP.Net Error: Cannot create an object of type System.Int32 from its string representation '' for the RepeatColumns property

Last Reply 4 months ago By dharmendr

Posted 4 months ago

unable to see the design on the page in c#

Cannot create an object of type 'System.Int32' from its string representation '' for the 'RepeatColumns' property

            <div class="row">
                <div class="col-md-12">
                    <div class="table-responsive">
                        <asp:DataList ID="DataList1" runat="server" RepeatColumns="" RepeatLayout="Flow">
                                <table class="table table-border table-striped custom-table datatable mb-0">
                                            <th class="text-right">Action</th>
                                            <img width="28" height="28" src="../assets/img/user.jpg" class="rounded-circle m-r-5" alt="">
                                            Jennifer Robinson</td>
                                        <td>1545 Dorsey Ln NE, Leland, NC, 28451</td>
                                        <td>(207) 808 8863</td>
                                        <td><a href="" class="__cf_email__" data-cfemail="adc7c8c3c3c4cbc8dfdfc2cfc4c3dec2c3edc8d5ccc0ddc1c883cec2c0">[email&#160;protected]</a></td>
                                        <td class="text-right">
                                            <div class="dropdown dropdown-action">
                                                <a href="#" class="action-icon dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-ellipsis-v"></i></a>
                                                <div class="dropdown-menu dropdown-menu-right">
                                                    <a class="dropdown-item" href='<%=ResolveUrl("~/Edit-Patient")%>'><i class="fa fa-pencil m-r-5"></i>Edit</a>
                                                    <a class="dropdown-item" href="#" data-toggle="modal" data-target="#delete_patient"><i class="fa fa-trash-o m-r-5"></i>Delete</a>

in design mode is viewable but while run the page to browser that time unable to seen design

we have try to another pc and VS2010 still faccing the same issue 

Posted 4 months ago

Hi pratikshir,

You are unable to see the design page due to the below error.

Cannot create an object of type 'System.Int32' from its string representation '' for the 'RepeatColumns' property

As per the error you have not assign any integer value to the RepeatColumns property of DataList.

So assign any integer value to RepeatColumns property or remove the property from the DataList.

<asp:DataList ID="DataList1" runat="server" RepeatColumns="1" RepeatLayout="Flow">