[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ASP.net Datalist ItemTemplate problem

Posted on 2004-11-06
3
Medium Priority
?
694 Views
Last Modified: 2010-05-18
I currently have HTML templates for a website I am working on, and need to convert them to ASPX pages for our developers.  I have a very basic understanding of what to do, but the following code (code shown below) is challenging me.  I need to have this code used as an itemtemplate for a page that will display a list of current affiliates, with the ability to modify or delete each entry, but cannot figure out how to do it.

Can anyone show how to convert this segment of code into ASP.net code?

Thanks.
Jason




CODE :


<br>
                        <br>
                        <br>
                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="605" id="table3">
                              <tr>
                                    <td width="605">
                                    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="605" id="table4">
                                          <tr>
                                                <td width="605">
                                                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="605" id="table5">
                                                      <tr>
                                                            <td width="2" valign="top" background="../images/2verticaldots.gif">
                                                            <img border="0" src="../images/spacer.gif" width="2" height="2"></td>
                                                            <td width="601" valign="top">
                                                            <table style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0" width="601" border="0" id="table6">
                                                                  <tr>
                                                                        <td width="601">
                                                                        <table style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0" width="100%" border="0" id="table7">
                                                                              <tr>
                                                                                    <td width="601" background="../images/dotbg.gif" height="2">
                                                                                    <img height="2" src="../images/spacer.gif" width="1" border="0"></td>
                                                                              </tr>
                                                                              <tr>
                                                                                    <td width="100%">
                                                                                    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="601" height="171" id="table1">
                                                                                          <tr>
                                                                                                <td height="10" bgcolor="#EEEEEE">
                                                                                                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="601" id="table2" height="12">
                                                                                                      <tr>
                                                                                                            <td height="12" width="290">
                                                                                                            <p align="center">
                                                                                                            <b>Affiliate
                                                                                                            Information</b></p>
                                                                                                            </td>
                                                                                                            <td height="12" width="20">
                                                                                                            <img border="0" src="../images/spacer.gif" width="20" height="10"></td>
                                                                                                            <td height="12" width="291">
                                                                                                            <p align="center">
                                                                                                            <b>Contact
                                                                                                            Information</b></p>
                                                                                                            </td>
                                                                                                      </tr>
                                                                                                </table>
                                                                                                </td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td background="../images/dotbg.gif" height="1" width="601">
                                                                                                <img height="1" src="../images/spacer.gif" width="1" border="0"></td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td background="../images/dotbg.gif" height="1" width="601">
                                                                                                <img height="1" src="../images/spacer.gif" width="1" border="0"></td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td height="10">
                                                                                                <img border="0" src="../images/spacer.gif" width="1" height="10"></td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td height="63">
                                                                                                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="601" id="table3" height="90">
                                                                                                      <tr>
                                                                                                            <td valign="top" width="290" height="90">
                                                                                                            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="290" id="table4">
                                                                                                                  <tr>
                                                                                                                        <td width="100">
                                                                                                                        <p align="right">Affiliate ID :</p>
                                                                                                                        </td>
                                                                                                                        <td width="190"><input type="text" name="T2" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                                  <tr>
                                                                                                                        <td width="100">
                                                                                                                        <p align="right">Name :</p>
                                                                                                                        </td>
                                                                                                                        <td width="190"><input type="text" name="T3" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                                  <tr>
                                                                                                                        <td width="100" align="right">Email :</td>
                                                                                                                        <td width="190"><input type="text" name="T4" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                                  <tr>
                                                                                                                        <td width="100" align="right">Password :</td>
                                                                                                                        <td width="190"><input type="text" name="T5" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                                  <tr>
                                                                                                                        <td width="100">
                                                                                                                        <p align="right">URL :</p>
                                                                                                                        </td>
                                                                                                                        <td width="190"><input type="text" name="T6" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                            </table>
                                                                                                            </td>
                                                                                                            <td valign="top" width="20" height="90">
                                                                                                            <img border="0" src="../images/spacer.gif" width="20" height="10"></td>
                                                                                                            <td valign="top" width="291" height="90">
                                                                                                            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="290" id="table5">
                                                                                                                  <tr>
                                                                                                                        <td width="100">
                                                                                                                        <p align="right">Address :</p>
                                                                                                                        </td>
                                                                                                                        <td width="190"><input type="text" name="T7" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                                  <tr>
                                                                                                                        <td width="100" align="right">City :</td>
                                                                                                                        <td width="190"><input type="text" name="T8" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                                  <tr>
                                                                                                                        <td width="100" align="right">State :</td>
                                                                                                                        <td width="190"><select name="cst_bill_state" size="1">
                                                                                                                        <option value="AA">AA</option>
                                                                                                                        <option value="AE">AE</option>
                                                                                                                        <option value="AK">AK</option>
                                                                                                                        <option value="AL">AL</option>
                                                                                                                        <option value="AP">AP</option>
                                                                                                                        <option value="AR">AR</option>
                                                                                                                        <option value="AZ">AZ</option>
                                                                                                                        <option value="CA">CA</option>
                                                                                                                        <option value="CO">CO</option>
                                                                                                                        <option value="CT">CT</option>
                                                                                                                        <option value="DC">DC</option>
                                                                                                                        <option value="DE">DE</option>
                                                                                                                        <option value="FL">FL</option>
                                                                                                                        <option value="GA">GA</option>
                                                                                                                        <option value="HI">HI</option>
                                                                                                                        <option value="IA">IA</option>
                                                                                                                        <option value="ID">ID</option>
                                                                                                                        <option value="IL">IL</option>
                                                                                                                        <option value="IN">IN</option>
                                                                                                                        <option value="KS">KS</option>
                                                                                                                        <option value="KY">KY</option>
                                                                                                                        <option value="LA">LA</option>
                                                                                                                        <option value="MA">MA</option>
                                                                                                                        <option value="MD">MD</option>
                                                                                                                        <option value="ME">ME</option>
                                                                                                                        <option value="MI">MI</option>
                                                                                                                        <option value="MN">MN</option>
                                                                                                                        <option value="MO">MO</option>
                                                                                                                        <option value="MS">MS</option>
                                                                                                                        <option value="MT">MT</option>
                                                                                                                        <option value="NC">NC</option>
                                                                                                                        <option value="ND">ND</option>
                                                                                                                        <option value="NE">NE</option>
                                                                                                                        <option value="NH">NH</option>
                                                                                                                        <option value="NJ">NJ</option>
                                                                                                                        <option value="NM">NM</option>
                                                                                                                        <option value="NV">NV</option>
                                                                                                                        <option value="NY">NY</option>
                                                                                                                        <option value="OH">OH</option>
                                                                                                                        <option value="OK">OK</option>
                                                                                                                        <option value="OR">OR</option>
                                                                                                                        <option value="PA">PA</option>
                                                                                                                        <option value="RI">RI</option>
                                                                                                                        <option value="SC">SC</option>
                                                                                                                        <option value="SD">SD</option>
                                                                                                                        <option value="TN">TN</option>
                                                                                                                        <option value="TX">TX</option>
                                                                                                                        <option value="UT">UT</option>
                                                                                                                        <option value="VA">VA</option>
                                                                                                                        <option value="VT">VT</option>
                                                                                                                        <option value="WA">WA</option>
                                                                                                                        <option value="WI">WI</option>
                                                                                                                        <option value="WV">WV</option>
                                                                                                                        <option value="WY">WY</option>
                                                                                                                        </select></td>
                                                                                                                  </tr>
                                                                                                                  <tr>
                                                                                                                        <td width="100">
                                                                                                                        <p align="right">Zip :</p>
                                                                                                                        </td>
                                                                                                                        <td width="190"><input type="text" name="T9" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                                  <tr>
                                                                                                                        <td width="100">
                                                                                                                        <p align="right">Contact Phone :</p>
                                                                                                                        </td>
                                                                                                                        <td width="190"><input type="text" name="T1" size="20" value="Default Value"></td>
                                                                                                                  </tr>
                                                                                                            </table>
                                                                                                            </td>
                                                                                                      </tr>
                                                                                                </table>
                                                                                                </td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td height="10">
                                                                                                <img border="0" src="../images/spacer.gif" width="1" height="10"></td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td background="../images/dotbg.gif" height="1" width="601">
                                                                                                <img height="1" src="../images/spacer.gif" width="1" border="0"></td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td background="../images/dotbg.gif" height="1" width="601">
                                                                                                <img height="1" src="../images/spacer.gif" width="1" border="0"></td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td height="10">
                                                                                                <img border="0" src="../images/spacer.gif" width="1" height="10"></td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td height="20">
                                                                                                <div align="center">
                                                                                                      <center>
                                                                                                      <table id="table6" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" height="20" cellspacing="0" cellpadding="0" width="300" border="0">
                                                                                                            <tr>
                                                                                                                  <td width="125" height="20">
                                                                                                                  <p align="center">
                                                                                                                  <input class="button" type="button" value="Modify Affiliate"></p>
                                                                                                                  </td>
                                                                                                                  <td width="50" height="20">
                                                                                                                  <img height="10" src="../images/spacer.gif" width="50" border="0"></td>
                                                                                                                  <td width="125" height="20">
                                                                                                                  <p align="center">
                                                                                                                  <input class="button" onclick="confirm('Are you sure that you want to delete this affiliate?')" type="button" value="Delete Affiliate"></p>
                                                                                                                  </td>
                                                                                                            </tr>
                                                                                                      </table>
                                                                                                      </center>
                                                                                                </div>
                                                                                                </td>
                                                                                          </tr>
                                                                                          <tr>
                                                                                                <td height="10">
                                                                                                <img border="0" src="../images/spacer.gif" width="1" height="10"></td>
                                                                                          </tr>
                                                                                    </table>
                                                                                    </td>
                                                                              </tr>
                                                                        </table>
                                                                        </td>
                                                                  </tr>
                                                                  <tr>
                                                                        <td width="601" background="../images/dotbg.gif" height="2">
                                                                        <img height="2" src="../images/spacer.gif" width="1" border="0"></td>
                                                                  </tr>
                                                            </table>
                                                            </td>
                                                            <td width="2" valign="top" background="../images/2verticaldots.gif">
                                                            <img border="0" src="../images/spacer.gif" width="2" height="2"></td>
                                                      </tr>
                                                </table>
                                                </td>
                                          </tr>
                                    </table>
                                    </td>
                              </tr>
                        </table>
                        <br>
                        <br>
                        <br>
0
Comment
Question by:harton
1 Comment
 
LVL 28

Accepted Solution

by:
mmarinov earned 2000 total points
ID: 12516774
Hi harton,

add t your input controls runat="server" so the developers can use these controls in the code bhind in the aspx page and give them an appropriate id, like
<input type="text" runat="server" id="T9">

or
<input type="button" runat="server" id="delete"
also you have to remeber that you can not add client script function like onclick to the server controls

Regards!
B..M
mmarinov
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month18 days, 4 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question