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

Last Reply 16 days ago By dharmendr

Posted 18 days ago

unable to see the design on the page in asp.net 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">
                            <HeaderTemplate>
                                <table class="table table-border table-striped custom-table datatable mb-0">
                                    <thead>
                                        <tr>
                                            <th>Name</th>
                                            <th>Age</th>
                                            <th>Address</th>
                                            <th>Phone</th>
                                            <th>Email</th>
                                            <th class="text-right">Action</th>
                                        </tr>
                                    </thead>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tbody>
                                    <tr>
                                        <td>
                                            <img width="28" height="28" src="../assets/img/user.jpg" class="rounded-circle m-r-5" alt="">
                                            Jennifer Robinson</td>
                                        <td>35</td>
                                        <td>1545 Dorsey Ln NE, Leland, NC, 28451</td>
                                        <td>(207) 808 8863</td>
                                        <td><a href="http://dreamguys.co.in/cdn-cgi/l/email-protection" 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>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    
                                </tbody>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:DataList>
                    </div>
                </div>
            </div>

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 18 days 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">

 


Posted 16 days ago

Verify your project folder. There are lots of file are missing that are available in solution explore.