Web Forms Data Controlshttp://forums.asp.net/24.aspx/1?Web+Forms+Data+ControlsData-bound controls such as the GridView, DataGrid, DataList, FormView, DetailsView, Repeater, and Microsoft ChartWed, 22 May 2013 15:45:31 -0400urn:uuid:00000000-0000-0000-0000-000000000024urn:uuid:00000000-0000-0000-0000-000005402570http://forums.asp.net/p/1908876/5402570.aspx/1?Hide+LinkButtons+in+Formview+based+on+RoleHide LinkButtons in Formview based on Role <p>Need to be able to either hide the New, Update, Insert, Delete linkbuttons or hide the EditItem and InsertItem templates&nbsp;from users not in Admin Role. Can anyone assist</p> 2013-05-22T18:24:23-04:002013-05-22T18:24:23.113-04:00urn:uuid:00000000-0000-0000-0000-000005402569http://forums.asp.net/p/1908875/5402569.aspx/1?edit+delete+update+only+chat+text+witch+is+from+useredit, delete, update only chat text witch is from user <p>Dear reader,</p> <p>I have made a chat with a data list in this datalist there is a label named lblUser.</p> <p>Now i have made my script so far that in every chat Text a edit/update and delete button is so the user can edit there text if something is written wrong. The problem is they can also edit the text from other users. Is there some way how i can resolve this problem. I used cookies for recognize the user. Is post snippets of my scrit how i do something.</p> <p>Most urgent question is How can i make the buttons edit/update/delete vissible &quot;false&quot; on the other users there post, so they can only edit there own post, or can i make my edit part in ItemCommand so that the edit button only on own post is working</p> <p><strong>Recognize the Loggedin User:</strong></p> <pre class="prettyprint">protected void Page_Load(object sender, EventArgs e) { HttpCookie User = Request.Cookies[&quot;alwayson&quot;]; // Read the cookie information and display it. if (User != null) { lblUser.Text = User[&quot;Name&quot;]; } }</pre> <p><strong>For editing the posted post:</strong></p> <pre class="prettyprint"> protected void foradatalist_ItemCommand(object source, DataListCommandEventArgs e) { Label lblUser = (Label)foradatalist.Items[e.Item.ItemIndex].FindControl("lblUser"); if (e.CommandName == "edit") { Label label1 = (Label)foradatalist.Items[e.Item.ItemIndex].FindControl("lblverhaal"); tbpost.Text = label1.Text; } else { }</pre> <p><br> <br> </p> 2013-05-22T18:24:09-04:002013-05-22T18:24:09.593-04:00urn:uuid:00000000-0000-0000-0000-000005402609http://forums.asp.net/p/1908888/5402609.aspx/1?How+to+identify+the+ID+of+DDL+inside+ASP+NET+Repeater+How to identify the ID of DDL inside ASP.NET Repeater! <p>Helo all,</p> <p>I try to update the value for DDL in each row of repeater. My detailed front end ASPX of the repeater as following:</p> <p>&nbsp;--------------------------------------------------------------------------------------</p> <p>&lt;asp:Repeater ID=&quot;repeaterDept&quot; runat=&quot;server&quot;&gt;</p> <p>&nbsp; &nbsp; &nbsp; &lt;ItemTemplate&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;table&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;tr&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;td align=&quot;justify&quot; width=&quot;30&quot;&gt;&lt;asp:label ID=&quot;lblName&quot; runat=&quot;server&quot; Text='&lt;%# Eval(&quot;Name&quot;) %&gt;' /&gt;&lt;/td&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;td align=&quot;left&quot; width=&quot;240&quot;&gt;&lt;asp:label ID=&quot;lblDepartment&quot; runat=&quot;server&quot; Text='&lt;%# Eval(&quot;Department&quot;) %&gt;' /&gt;&lt;/td&gt; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;td&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;asp:DropDownList ID=&quot;ddlAge&quot; runat=&quot;server&quot;&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;asp:ListItem&gt;20&lt;/asp:ListItem&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;asp:ListItem&gt;40&lt;/asp:ListItem&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;asp:ListItem&gt;60&lt;/asp:ListItem&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/asp:DropDownList&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/td&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/tr&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/table&gt; <br> &nbsp; &nbsp; &nbsp; &lt;/ItemTemplate&gt;<br> &lt;/asp:Repeater&gt;</p> <p>When I populate the data from above repeater, the sample data look like as following:</p> <p>John &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sale &nbsp; &nbsp; &nbsp; &nbsp; ddl component</p> <p>Kelly &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ddl component</p> <p>...</p> <p>How do I can set ddl value for first record such ddlAge?.SelectValue = 20 from dropdowlist items and&nbsp;ddl value for second record such ddlAge?.SelectValue = 40</p> <p>I looked in source code view from brownser, I see the system generated the automatic ID=&nbsp;repeaterDept_ddlAge_0 for first record,&nbsp;ID=&nbsp;repeaterDept_ddlAge_1 for second record.&nbsp;Any ideas how to identify the dropdownlist control for each row? Thanks in advance.</p> <p></p> <p></p> 2013-05-22T19:21:26-04:002013-05-22T19:21:26.243-04:00urn:uuid:00000000-0000-0000-0000-000005402597http://forums.asp.net/p/1908885/5402597.aspx/1?girdview+populated+on+buttonclick+and+on+page+navigation+it+disappearsgirdview populated on buttonclick and on page navigation it disappears <p>&nbsp;gridview&nbsp; populated with pages. If I try to select diff pages in the gridview it disappears but appears on buttonclick. I see its opening and closing sql connection on each page. Anyway I can avoid this. Heres is my code.</p> <p>&lt;td&gt;Enter Name: &lt;/td&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> <p>&lt;td&gt; &lt;asp:TextBox ID=&quot;txtName&quot; runat=&quot;server&quot;&gt;&lt;/asp:TextBox&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; &lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot; Text=&quot;click search to find ID&quot;onclick=&quot;Button1_Click&quot; /&gt; &lt;/td&gt;</p> <p>&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ID:&lt;/td&gt;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;asp:TextBox ID=&quot;txtID&quot; runat=&quot;server&quot;&gt;&lt;/asp:TextBox&gt;&lt;/td&gt;&lt;/tr&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/table&gt;</p> <p>&nbsp;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot;&nbsp; AllowPaging=&quot;True&quot; AllowSorting=&quot;True&quot; AutoGenerateSelectButton=&quot;True&quot; OnSelectedIndexChanged=&quot;Gridview1_SelectedIndexChanged&quot; ShowFooter=&quot;True&quot; onPageIndexChanging=&quot;GridView1_PageIndexChanging&quot; BorderStyle=&quot;Solid&quot;&gt;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;EditRowStyle BorderStyle=&quot;Solid&quot; /&gt;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;SelectedRowStyle BackColor=&quot;#FF9900&quot; BorderStyle=&quot;Solid&quot; /&gt;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/asp:GridView&gt;</p> <p>&nbsp;</p> <p>Cs:</p> <p>protected void Gridview1_SelectedIndexChanged(object sender, EventArgs e)</p> <p>&nbsp; {</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; txtID.Text = GridView1.SelectedRow.Cells[1].Text;</p> <p>&nbsp;</p> <p>&nbsp; }</p> <p>&nbsp;&nbsp;&nbsp; protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)</p> <p>&nbsp;&nbsp;&nbsp; {</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GridView1.PageIndex = e.NewPageIndex;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GridView1.SelectedIndex = -1;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GridView1.DataBind();</p> <p>&nbsp;&nbsp;&nbsp; }</p> <p>&nbsp;</p> <p>&nbsp;&nbsp;&nbsp; protected void Button1_Click(object sender, EventArgs e)</p> <p>&nbsp;&nbsp;&nbsp; {</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlConnection myConn = new SqlConnection(ConfigurationManager.ConnectionStrings[&quot;conn&quot;].ToString());</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myConn.Open();</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string strSQL = &quot;&quot;;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlDataAdapter da = new SqlDataAdapter(strSQL, myConn);</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataSet ds = new DataSet();</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; da.Fill(ds, &quot;&quot;);</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GridView1.DataSource = ds;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GridView1.DataBind();</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myConn.Close();</p> <p>&nbsp;&nbsp;&nbsp; }</p> 2013-05-22T19:04:36-04:002013-05-22T19:04:36.927-04:00urn:uuid:00000000-0000-0000-0000-000005402603http://forums.asp.net/p/1908887/5402603.aspx/1?Sum+values+left+to+right+in+GridviewSum values left to right in Gridview <p>I have a gridview that now needs a new column for total, so the hours from the drop down list in each column will sum in the last column.&nbsp; I have a sum in the footer that sums these values from top down, but now how do I get the same function to return a sum for each row.&nbsp;</p> <p>Here is the javascript I used for the footer sum and that works fine:</p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">function</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> hrcount() {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">for</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> (</span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">var</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> c = 1; c &lt; 11; c&#43;&#43;) {</span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">var</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> total = 0</span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">var</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> val = 0</span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">for</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> (</span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">var</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> i = 0; i &lt; 10; i&#43;&#43;) {</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">var</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> name = </span></span><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small"><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small"><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small">&quot;MainContent_gvts_hours&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> &#43; c &#43; </span></span><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small"><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small"><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small">&quot;_&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> &#43; i;</span></span></em></p> <p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; val = &#43;document.getElementById(name).value;</em></p> <p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; total &#43;= val;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">var</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> namea = </span></span><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small"><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small"><span size="2" color="#a31515" face="Consolas" style="color:#a31515; font-family:Consolas; font-size:small">&quot;lblhrs&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> &#43; c;</span></span></em></p> <p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.getElementById(namea).innerHTML = total;</em></p> <p><em></em>&nbsp;</p> <p></p> <p><em><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">&lt;asp</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">:</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">TemplateField</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">HeaderText</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;Insert Job&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">HeaderStyle-VerticalAlign</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;Middle&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">&nbsp; </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">ItemStyle-HorizontalAlign</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;Center&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">FooterTemplate</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">label</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">id</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;lblhrs1&quot;&gt;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;/</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">FooterTemplate&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">HeaderTemplate</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">div</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">asp</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">:</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">Button</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">ID</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;btnjob1&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">runat</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;server&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">Text</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;Add Job&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">CommandArgument</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;1&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">&nbsp;</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em></p> <p><em><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">CommandName</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;addjob&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">&nbsp; </span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">/&gt;&lt;/</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">div</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">div</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">style</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;</span></span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">layout-flow</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">: </span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">vertical-ideographic&quot;&gt;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">asp</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">:</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">Label</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">ID</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;lbljob1&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">runat</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;server&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">Text</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">Font-Size</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;Medium&quot;&gt;&lt;/</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">asp</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">:</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">Label</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;/</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">div</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;/</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">HeaderTemplate</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">ItemTemplate</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">asp</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">:</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">DropDownList</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">ID</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;hours1&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">runat</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;server&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">style</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;</span></span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">text-align</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small">: </span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">center&quot;&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;/</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">asp</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">:</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">DropDownList</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;/</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">ItemTemplate</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">HeaderStyle</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">VerticalAlign</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;Middle&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">/&gt;</span></span></span></em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">ItemStyle</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small"><span size="2" color="#ff0000" face="Consolas" style="color:#ff0000; font-family:Consolas; font-size:small">HorizontalAlign</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">=&quot;Center&quot;</span></span></span><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"> </span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">/&gt;</span></span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em></p> <p><em><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&lt;/</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">asp</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">:</span></span></span><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small"><span size="2" color="#800000" face="Consolas" style="color:#800000; font-family:Consolas; font-size:small">TemplateField</span></span></span><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small"><span size="2" color="#0000ff" face="Consolas" style="color:#0000ff; font-family:Consolas; font-size:small">&gt;</span></span></span></em></p> <p></p> <p></p> <p>&nbsp;</p> <p><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"></span></span></p> 2013-05-22T19:15:43-04:002013-05-22T19:15:43.38-04:00urn:uuid:00000000-0000-0000-0000-000005402590http://forums.asp.net/p/1908883/5402590.aspx/1?need+help+checkbox+list+passing+selected+values+to+sql+comma+separated+functionneed help...checkbox list - passing selected values to sql comma separated function <p>I have a checkbox list and a many to many table. i am trying to use the checkbox list to filter a sql query and the funtion works. the query works, but when i try to hook up the html checkbox list to the query..it falls apart.</p> <p>ex...<br> (dashes were for formatting purposes only)<br> person -------person/sport---------sport<br> _________________________________________<br> a ------------a | baseball------baseball<br> b ------------a | football------football<br> c ------------a | baseball------basketball<br> --------------b | baseball <br> --------------b | football<br> --------------c | baseball <br> --------------c | football<br> --------------c | basketball</p> <p>i've been trying to use the sqldatasource wizard to plug everything together. i set the checkbox list as the control parameter, but for some reason, the query doesn't work properly when i try to debug the page.</p> <p>when i test the query, if i pick any combo with baseball and basketball, or football and basketball...i get all 3 persons like i am supposed to.</p> <p>when i debug and run the page, if i try any combo with basketball (ie baseball, baketball) person b does NOT show up and i don't understand why.</p> <p>how do i send the checkbox selected values to the split function? is it possible to do this with the asp sqldatasource wizard? if not...how do i accomplish this?</p> <p>here's the select parameter:</p> <pre class="prettyprint">&lt;asp:ControlParameter ControlID=&quot;DropDownCheckBoxes1&quot; ConvertEmptyStringToNull=&quot;False&quot; DefaultValue=&quot;0&quot; Name=&quot;Ids&quot; PropertyName=&quot;SelectedValue&quot; Size=&quot;8000&quot; Type=&quot;String&quot; /&gt;</pre> <p>here's the function:</p> <pre class="prettyprint">ALTER FUNCTION SplitDelimiterString1 (@StringWithDelimiter VARCHAR(8000), @Delimiter VARCHAR(8)) RETURNS @ItemTable TABLE (Item VARCHAR(8000)) AS BEGIN DECLARE @StartingPosition INT; DECLARE @ItemInString VARCHAR(8000); SELECT @StartingPosition = 1; --Return if string is null or empty IF LEN(@StringWithDelimiter) = 0 OR @StringWithDelimiter IS NULL RETURN; WHILE @StartingPosition &gt; 0 BEGIN --Get starting index of delimiter .. If string --doesn't contain any delimiter than it will returl 0 SET @StartingPosition = CHARINDEX(@Delimiter,@StringWithDelimiter); --Get item from string IF @StartingPosition &gt; 0 SET @ItemInString = SUBSTRING(@StringWithDelimiter,0,@StartingPosition) ELSE SET @ItemInString = @StringWithDelimiter; --If item isn't empty than add to return table IF( LEN(@ItemInString) &gt; 0) INSERT INTO @ItemTable(Item) VALUES (@ItemInString); --Remove inserted item from string SET @StringWithDelimiter = SUBSTRING(@StringWithDelimiter,@StartingPosition + LEN(@Delimiter),LEN(@StringWithDelimiter) - @StartingPosition) --Break loop if string is empty IF LEN(@StringWithDelimiter) = 0 BREAK; END RETURN END</pre> <p>here's the query:</p> <pre class="prettyprint">SELECT DISTINCT person.personID, sports.sportsID, person.personName, sports.sport, FROM sports INNER JOIN person INNER JOIN personSport ON personSport.personID = person.personID INNER JOIN personSport ON personSport.sportID = sports.sportsID WHERE (person.personName LIKE '%' + @personName + '%') AND (sports.sportID IN (SELECT ID FROM dbo.fnSplitter(@IDs) AS fnSplitter_1) OR @IDs = 0) /*the @IDs = 0 is for the initial value...eveerything pops up on pageload*/</pre> <p><br> <br> </p> 2013-05-22T18:54:03-04:002013-05-22T18:54:03.067-04:00urn:uuid:00000000-0000-0000-0000-000005401168http://forums.asp.net/p/1908527/5401168.aspx/1?export+table+to+CSV+problem+export table to CSV problem. <p>My gridview table has a field called comment with a lot of words in some case with a comma(',&quot;) separated. When I want to export the gridview table to a CSV file. it caused the field separator &quot;,&quot;. So I replace &quot;,&quot; in this field to a &quot;;&quot; before export. However, for some reason, the exported file for this field only contains part of field;s content and rest of was converted into the next line. some cells in this field are okay.</p> <p></p> <p>my code in C# is a nested loop as:</p> <p>for (int i = 0; i &lt; GridView1.Rows.Count; i&#43;&#43;)<br> {<br> //first column 0 starts at command column 0<br> for (int k = 1; k &lt; GridView1.Columns.Count; k&#43;&#43;)<br> {<br> //replace &quot;,&quot; in the comment field otherwise<br> //it will be confused with separator ','<br> if (k == 14) //this comment field<br> {<br> string str = GridView1.Rows[i].Cells[k].Text;<br> str = str.Replace(&quot;,&quot;, &quot;;&quot;);<br> if (str != null)<br> sb.Append(str &#43; ',');<br> else<br> sb.Append(&quot;&quot; &#43; ',');</p> <p>//Label2.Text = str.ToString();<br> }<br> //convert checkbox fields with value 1(checked) or 0 (unchecked)<br> else if (k == 17 || k == 20)<br> sb.Append(Convert.ToInt32(((CheckBox)GridView1.Rows[i].<br> Cells[k].Controls[0]).Checked).ToString() &#43; ',');<br> else<br> //append each cell in each column to StringBuilder<br> sb.Append(GridView1.Rows[i].Cells[k].Text &#43; ',');<br> }<br> //append new line<br> sb.Append(&quot;\r\n&quot;);<br> }</p> <p>output example:</p> <p>13253, 09/21/2007,383,27,5L,,0.007,11.257,2.753,0.006,0.098,2.854,613,SO4 very low ~1/5 rest<br> SRP low ~1/2 rest</p> <p>you can see &quot;SRP low ~1/2 rest&quot; goes to the next line.</p> <p>the orginal comment in this cell is: &quot;<span>SO4 very low, ~1/5 rest SRP low, ~1/2 rest no3_NO2 very low, ~1/4 rest&quot;</span></p> <p><span><br> </span></p> <p><span>there are some others cells in this fields like this. but some are exported correctly.</span></p> <p>Any help will be appreciated.</p> 2013-05-21T14:59:16-04:002013-05-21T14:59:16.84-04:00urn:uuid:00000000-0000-0000-0000-000005402520http://forums.asp.net/p/1908862/5402520.aspx/1?GridView1+error+on+row+deletingGridView1 ... error on row deleting <p>protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)<br> {<br> &nbsp;&nbsp;&nbsp; string a = GridView1.DataKeys[e.RowIndex].Value.ToString();<br> <br> &nbsp;&nbsp;&nbsp; string query = &quot;delete from orderdetails where id='&quot; &#43; a &#43; &quot;'&quot;;<br> <br> &nbsp;&nbsp;&nbsp; SqlConnection con = new SqlConnection(@&quot;Data Source=...&quot;);<br> <br> &nbsp;&nbsp;&nbsp; try<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con.Open();<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlCommand cmd = new SqlCommand(query, con);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.ExecuteNonQuery();<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con.Close();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp; &nbsp;<br> &nbsp;&nbsp;&nbsp; catch (Exception ex) { }<br> }</p> <p>-------------------------------------------------------------------------------------------- &amp; the arror is</p> <p>Error&nbsp;&nbsp; 3&nbsp;&nbsp; 'System.Web.UI.WebControls.GridViewDeletedEventArgs' does not contain a definition for 'RowIndex' and no extension method 'RowIndex' accepting a first argument of type 'System.Web.UI.WebControls.GridViewDeletedEventArgs' could be found (are you missing a using directive or an assembly reference?)&nbsp;&nbsp; E:\OnlineShopping\cancellation.aspx.cs&nbsp; 102 41&nbsp; E:\OnlineShopping\<br> <br> </p> <p></p> 2013-05-22T17:24:15-04:002013-05-22T17:24:15.37-04:00urn:uuid:00000000-0000-0000-0000-000005402332http://forums.asp.net/p/1908822/5402332.aspx/1?Display+query+string+value+in+a+label+Display query string value in a label <p>in my asp.net web i used the following code</p> <pre class="prettyprint">&lt;asp:LinkButton ID=&quot;LinkButton1&quot; runat=&quot;server&quot; PostBackUrl=&quot;unitlink.aspx?<strong>coy=tata</strong>&quot;&gt;Tata&lt;/asp:LinkButton&gt;</pre> <p>the data is correctly displaying in gridview.</p> <p>there is a label (label1.text) in the same page i want to display the <strong> coy</strong> in that label alongwith the gridview<br> <br> </p> 2013-05-22T14:35:19-04:002013-05-22T14:35:19.12-04:00urn:uuid:00000000-0000-0000-0000-000005402401http://forums.asp.net/p/1908838/5402401.aspx/1?Setting+a+value+in+a+grid+view+columnSetting a value in a grid view column <p>I have a gridview that displays a list of bugs, from a list of projects. The bug table has the user, bug description, etc. What it does not have is the project where the bug was found. Another Database has the list of projects, but there is no key to join the two. To get the bugs from each project i get the project name (which is the same as the database name) and use it to pull the bug lists from each database.</p> <p>&nbsp;</p> <pre class="prettyprint">protected void Button1_Click(object sender, EventArgs e) { //DataTable dt = new DataTable(); int i = 0; foreach (GridViewRow rowItem in gvProjects.Rows) { CheckBox chk = (CheckBox)(rowItem.Cells[0].FindControl(&quot;CheckBox1&quot;)); bool cval = chk.Checked; if (cval == true) { string val = gvProjects.Rows[i].Cells[2].Text; string project = gvProjects.Rows[i].Cells[2].Text; dt = getbgs(val, project); GridView2.DataSource = dt; GridView2.DataBind(); } i&#43;&#43;; } } private DataTable getbgs(string val, string project) { string username = DropDownList1.SelectedValue; SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[&quot;qcsiteadminConn&quot;].ConnectionString); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = &quot;select BG_SUMMARY, BG_USER_06, BG_RESPONSIBLE FROM &quot; &#43; val &#43; &quot;.td.BUG WHERE BG_RESPONSIBLE = '&quot; &#43; username &#43; &quot;' AND BG_USER_06 &lt;&gt; 'Closed' AND BG_USER_06 &lt;&gt; 'Fixed' &quot;; conn.Open(); dt.Load(cmd.ExecuteReader()); conn.Close(); return dt; }</pre> <p>Gridview2 shows the correct fields. The project name is retireved in a variable before each project retrieved fromthe database, but I cnat see a way to add&nbsp; that&nbsp; variable to the datatable. Ihave a template field with a Label but I dont see how to add the value to it.</p> 2013-05-22T15:34:41-04:002013-05-22T15:34:41.4-04:00urn:uuid:00000000-0000-0000-0000-000005399404http://forums.asp.net/p/1908139/5399404.aspx/1?How+to+do+rowspan+in+Header+of+Gridview+How to do rowspan in Header of Gridview?? <p>Hi all,</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I am trying to make header in Gridview such that two headers have rowspan=2 ,i have done Yearly Target to have coloumn span=2 but how to make Sno and Component to have rowspan=2&nbsp;</p> <p></p> <p></p> <p>This is my gridview:-</p> <p>&lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot; AutoGenerateColumns=&quot;False&quot; <br> DataSourceID=&quot;SqlDataSource3&quot; OnRowCreated=&quot;Gridview1_RowCreated&quot; &gt;<br> &lt;Columns&gt;<br> &lt;asp:BoundField DataField=&quot;Componentname&quot; <br> SortExpression=&quot;Componentname&quot; /&gt;<br> &lt;asp:BoundField DataField=&quot;Unit&quot; SortExpression=&quot;Unit&quot; /&gt;<br> <br> <br> &lt;asp:BoundField DataField=&quot;Phytarget&quot; HeaderText=&quot;Phytarget&quot; ReadOnly=&quot;True&quot; <br> SortExpression=&quot;Phytarget&quot; /&gt;<br> &lt;asp:BoundField DataField=&quot;Fintarget&quot; HeaderText=&quot;Fintarget&quot; ReadOnly=&quot;True&quot; <br> SortExpression=&quot;Fintarget&quot; /&gt;<br> &lt;/Columns&gt;<br> &lt;/asp:GridView&gt;</p> <p></p> <p>VB.net:--(griviewrowcreated event)</p> <p></p> <p>Protected Sub Gridview1_RowCreated(ByVal sender As Object, ByVal e As GridViewRowEventArgs)<br> If e.Row.RowType = DataControlRowType.Header Then<br> Dim HeaderGrid As GridView = DirectCast(sender, GridView)<br> Dim HeaderGridRow As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)<br> Dim HeaderCell As New TableCell()<br> HeaderCell.Text = &quot;&lt;h4&gt;Components&lt;/h4&gt;&quot;</p> <p>HeaderCell.ColumnSpan = 1</p> <p></p> <p>HeaderGridRow.Cells.Add(HeaderCell)</p> <p><br> HeaderCell = New TableCell()<br> HeaderCell.Text = &quot;Unit&quot;<br> HeaderCell.ColumnSpan = 1</p> <p>HeaderGridRow.Cells.Add(HeaderCell)</p> <p><br> HeaderCell = New TableCell()<br> HeaderCell.Text = &quot;Yearly target&quot;<br> HeaderCell.ColumnSpan = 2<br> HeaderGridRow.Cells.Add(HeaderCell)</p> <p></p> <p><br> GridView1.Controls(0).Controls.AddAt(0, HeaderGridRow)</p> <p></p> <p>End If<br> End Sub</p> 2013-05-20T07:16:28-04:002013-05-20T07:16:28.787-04:00urn:uuid:00000000-0000-0000-0000-000005402420http://forums.asp.net/p/1908840/5402420.aspx/1?How+to+check+for+null+value+from+textbox+in+gridview+How to check for null value from textbox in gridview?? <p>Hi,</p> <p>&nbsp; &nbsp; I need to check integer type value from textbox in itemtemplate , i am not geting VB code to check textbox value whether it is null or has some integer value &nbsp;in button click event,so how it can be done.???</p> 2013-05-22T15:51:01-04:002013-05-22T15:51:01.797-04:00urn:uuid:00000000-0000-0000-0000-000005402386http://forums.asp.net/p/1908834/5402386.aspx/1?How+to+do+required+field+validation+for+textbox+in+Gridview+How to do required field validation for textbox in Gridview?? <p>Hi all,</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; I have textbox in itemtemplate of gridview, i have button click event which saves all values from textbox in itemtemplate,so how can i do required field validation for textbox.</p> <p></p> <p>Thanks</p> <p></p> 2013-05-22T15:24:05-04:002013-05-22T15:24:05.323-04:00urn:uuid:00000000-0000-0000-0000-000005402325http://forums.asp.net/p/1908819/5402325.aspx/1?how+can+delete+a+uplodedfile+from+a+directory+and+session+by+clicking+gridview+delete+buttionhow can delete a uplodedfile from a directory and session by clicking gridview delete buttion <p>i have a post aspx page. where i post multiple file and after clicking upload buttion i take the data into session which i named&nbsp; session[&quot;Filelist&quot;]. now i want to delete one of my selected file by clicking delete buttion. how i delete it from code behind..and it should deleted&nbsp; from folder and also from session...</p> <p></p> <pre class="prettyprint">&lt;div&gt; &lt;asp:HiddenField ID=&quot;HiddenField1&quot; runat=&quot;server&quot; /&gt; &lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot; ForeColor=&quot;red&quot;&gt;&lt;/asp:Label&gt;&lt;br /&gt; Choose Your File :&lt;asp:FileUpload ID=&quot;FileUpload1&quot; runat=&quot;server&quot; /&gt; &lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot; Text=&quot;Upload&quot; OnClick=&quot;Button1_Click&quot; /&gt;&lt;br /&gt; &lt;asp:GridView ID=&quot;GridView1&quot; ShowHeader=&quot;False&quot; ForeColor=&quot;#99CD99&quot; runat=&quot;server&quot; AutoGenerateColumns=&quot;False&quot; CellPadding=&quot;10&quot; onselectedindexchanged=&quot;GridView1_SelectedIndexChanged&quot;&gt; &lt;Columns&gt; &lt;asp:TemplateField&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot; Text='&lt;%# Eval(&quot;text1&quot;) %&gt;'&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;HeaderStyle HorizontalAlign=&quot;Left&quot; /&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField &gt; &lt;ItemTemplate&gt; &lt;asp:LinkButton ID=&quot;lbtnDelete&quot; runat=&quot;server&quot; OnClick=&quot;GridView1_SelectedIndexChanged&quot; &gt;Delete&lt;/asp:LinkButton&gt; &lt;/ItemTemplate&gt; &lt;HeaderStyle HorizontalAlign=&quot;Left&quot; /&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;/div&gt;</pre> <pre class="prettyprint"> <br />//this is my code behind for upload file...<br /><br />protected void Button1_Click(object sender, EventArgs e) { string str = Server.MapPath("~/Files") + "\\" + (Request.QueryString["id"]); List&lt;temp&gt; objList = new List&lt;temp&gt;(); temp obj = new temp(); if (!Directory.Exists(str)) { Directory.CreateDirectory(str); } if (!File.Exists(str + "\\" + FileUpload1.FileName)) { FileUpload1.SaveAs(str + "\\" + FileUpload1.FileName); if (Session["FileList"] == null) { obj.text1 = FileUpload1.FileName; objList.Add(obj); Session["FileList"] = objList; } else { objList = (List&lt;temp&gt;)Session["FileList"]; obj.text1 = FileUpload1.FileName; objList.Add(obj); Session["FileList"] = objList; } GridView1.DataSource = objList; GridView1.DataBind(); } else { lblfile.Text = "File already exits*"; } }</pre> <pre class="prettyprint"><br />pls help me how to do it.............pls pls pls.............</pre> <p></p> 2013-05-22T14:25:16-04:002013-05-22T14:25:16.687-04:00urn:uuid:00000000-0000-0000-0000-000005402373http://forums.asp.net/p/1908830/5402373.aspx/1?How+Do+I+Find+the+Current+GridVIew+Row+How Do I Find the Current GridVIew Row? <p>I have a Gridview that has some DropDownLists in the EditItem Templates like the one below:</p> <pre class="prettyprint">&lt;asp:TemplateField HeaderText='Unit' SortExpression=&quot;unit&quot; ItemStyle-HorizontalAlign=&quot;Center&quot;&gt; &lt;EditItemTemplate&gt; &lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlUnit&quot; AppendDataBoundItems=&quot;true&quot; DataSourceID=&quot;SDS3&quot; DataValueField=&quot;id&quot; DataTextField=&quot;unit&quot; SelectedValue='&lt;%# Bind(&quot;unit&quot;) %&gt;' OnPreRender=&quot;Unit_PreRender&quot; &gt; &lt;asp:ListItem Value=&quot;&quot; Text=&quot;Select a Unit...&quot; /&gt; &lt;/asp:DropDownList&gt; &lt;/EditItemTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID=&quot;lblUnit&quot; runat=&quot;server&quot; Text='&lt;%# Bind(&quot;unit&quot;) %&gt;' /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:BoundField HeaderText=&quot;Unit Assigned&quot; DataField=&quot;unitassigndate&quot; SortExpression=&quot;unitassigndate&quot; ReadOnly=&quot;true&quot; /&gt;</pre> <p>I need to be able to determine the current GridView Row from within the PreRender handler for the DropDownList but have not been able to do so. The goal is to take an item from one of the cells and add it to the Item List for the DropDownList.</p> <p><br> Thanks!</p> 2013-05-22T15:18:38-04:002013-05-22T15:18:38.253-04:00urn:uuid:00000000-0000-0000-0000-000005399088http://forums.asp.net/p/1908068/5399088.aspx/1?Cannot+Populate+Gridview+to+dropdown+selection+event+Cannot Populate Gridview to dropdown selection event .. <p>Hi all ,</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I am using two dropdownlist to populate gridview , but still not working &nbsp;, Please Help me out to solve this.I would be very Thankful,</p> <p>please give code of VB.net if required,</p> <p>Code of .aspx file:--</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p> <p>&lt;table align=&quot;center&quot; cellspacing=&quot;16&quot;&gt;<br> &lt;tr&gt;<br> &lt;td&gt;Select Year :&lt;/td&gt;&lt;td&gt;<br> &lt;asp:DropDownList ID=&quot;DropDownList1&quot; runat=&quot;server&quot; AutoPostBack=&quot;True&quot; <br> DataSourceID=&quot;SqlDataSource1&quot; DataTextField=&quot;Yearname&quot; DataValueField=&quot;Year_id&quot; EnableViewState=&quot;true&quot;&gt;<br> &lt;/asp:DropDownList&gt;<br> &lt;asp:SqlDataSource ID=&quot;SqlDataSource1&quot; runat=&quot;server&quot; <br> ConnectionString=&quot;&lt;%&#36; ConnectionStrings:Connect %&gt;&quot; <br> SelectCommand=&quot;SELECT [Year_id], [Yearname] FROM [Year]&quot;&gt;<br> &lt;/asp:SqlDataSource&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> <br> &lt;tr&gt;<br> &lt;td&gt;Select Month :&lt;/td&gt;<br> &lt;td&gt; &lt;asp:DropDownList ID=&quot;DropDownList2&quot; runat=&quot;server&quot; <br> DataSourceID=&quot;SqlDataSource2&quot; DataTextField=&quot;Districtname&quot; <br> DataValueField=&quot;District_id&quot; AutoPostBack=&quot;True&quot; EnableViewState=&quot;true&quot;&gt;<br> &lt;/asp:DropDownList&gt;<br> &lt;asp:SqlDataSource ID=&quot;SqlDataSource2&quot; runat=&quot;server&quot; <br> ConnectionString=&quot;&lt;%&#36; ConnectionStrings:Connect %&gt;&quot; <br> SelectCommand=&quot;SELECT [District_id], [Districtname] FROM [District]&quot;&gt;<br> &lt;/asp:SqlDataSource&gt;&lt;/td&gt;<br> <br> &lt;/tr&gt;<br> &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;<br> &lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot; AutoGenerateColumns=&quot;False&quot; <br> DataSourceID=&quot;SqlDataSource3&quot; &gt;<br> &lt;Columns&gt;<br> &lt;asp:BoundField DataField=&quot;Componentname&quot; HeaderText=&quot;Componentname&quot; <br> SortExpression=&quot;Componentname&quot; /&gt;<br> &lt;asp:BoundField DataField=&quot;Unit&quot; HeaderText=&quot;Unit&quot; SortExpression=&quot;Unit&quot; /&gt;<br> &lt;asp:BoundField DataField=&quot;Targetid&quot; HeaderText=&quot;Targetid&quot; <br> InsertVisible=&quot;False&quot; ReadOnly=&quot;True&quot; SortExpression=&quot;Targetid&quot; /&gt;<br> <br> &lt;asp:BoundField DataField=&quot;Phytarget&quot; HeaderText=&quot;Phytarget&quot; ReadOnly=&quot;True&quot; <br> SortExpression=&quot;Phytarget&quot; /&gt;<br> &lt;asp:BoundField DataField=&quot;Fintarget&quot; HeaderText=&quot;Fintarget&quot; ReadOnly=&quot;True&quot; <br> SortExpression=&quot;Fintarget&quot; /&gt;<br> &lt;/Columns&gt;<br> &lt;/asp:GridView&gt;<br> &lt;asp:SqlDataSource ID=&quot;SqlDataSource3&quot; runat=&quot;server&quot; <br> ConnectionString=&quot;&lt;%&#36; ConnectionStrings:Connect %&gt;&quot; SelectCommand=&quot;Hotarget&quot; <br> SelectCommandType=&quot;StoredProcedure&quot;&gt;<br> &lt;SelectParameters&gt;<br> &lt;asp:ControlParameter ControlID=&quot;DropDownList1&quot; DefaultValue=&quot;5&quot; Name=&quot;Yearid&quot; <br> PropertyName=&quot;SelectedValue&quot; Type=&quot;Int32&quot; /&gt;<br> &lt;asp:ControlParameter ControlID=&quot;DropDownList2&quot; DefaultValue=&quot;5&quot; <br> Name=&quot;Districtid&quot; PropertyName=&quot;SelectedValue&quot; Type=&quot;Int32&quot; /&gt;<br> &lt;/SelectParameters&gt;<br> &lt;/asp:SqlDataSource&gt;&lt;/td&gt;&lt;/tr&gt;<br> &lt;/table&gt;</p> 2013-05-19T19:01:41-04:002013-05-19T19:01:41.773-04:00urn:uuid:00000000-0000-0000-0000-000005399682http://forums.asp.net/p/1908209/5399682.aspx/1?sorting+the+gridview+to+ascending+and+then+to+descending+sorting the gridview to ascending and then to descending <p>&nbsp;</p> <p>Ref&nbsp;&nbsp;&nbsp;&nbsp; Ref Name&nbsp;&nbsp;&nbsp; A B C D E F<br> 540&nbsp;Admin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 1 2 2 2 3<br> 454&nbsp;&nbsp;&nbsp;&nbsp; Expenses&nbsp;&nbsp;&nbsp; 3 2 2 2 1 1<br> 101&nbsp;&nbsp;&nbsp;&nbsp; HR&nbsp;&nbsp;&nbsp;&nbsp; 1 2 2 2 2 2<br> 107&nbsp;Resources&nbsp;&nbsp; 3 1 2 1 1 1</p> <p>when I clik on the 'Ref', it is sorting the Ref in the ascending order as follows</p> <p>101&nbsp;&nbsp;&nbsp;&nbsp; HR&nbsp;&nbsp;&nbsp;&nbsp; 1 2 2 2 2 2<br> 107&nbsp;Resources&nbsp;&nbsp; 3 1 2 1 1 1<br> 454&nbsp;&nbsp;&nbsp;&nbsp; Expenses&nbsp;&nbsp;&nbsp; 3 2 2 2 1 1<br> 540&nbsp;Admin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 1 2 2 2 3</p> <p>and the code for that is follows</p> <p>protected void gvrecords_Sorting(object sender, GridViewSortEventArgs e)<br> &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GridView gv = sender as GridView;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataSet ds = new DataSet();<br> &nbsp;List&lt;ReturnStatusRow&gt; dataSourceList = gv.DataSource as List&lt;ReturnStatusRow&gt;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dataSourceList.Count&gt;0)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp; Comparer&lt;ReturnStatusRow&gt; defComp = Comparer&lt;ReturnStatusRow&gt;.Default;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defComp.Compare(dataSourceList[0], dataSourceList[1]);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSourceList.Sort();<br> &nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gridview1.Datasource = dataSourceList;<br> &nbsp;&nbsp;&nbsp;&nbsp; gridview1.DataBind();<br> &nbsp;}<br> }</p> <p>public int CompareTo(ReturnStatusRow other)<br> &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (this.Ref.CompareTo(other.Ref) != 0)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this.Ref.CompareTo(other.Ref);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> <p>&nbsp;&nbsp;&nbsp; }<br> now for the second time click, it should sort in descending order. for the third- ascending, <br> fourth-descending and should&nbsp; continue in that pattern of ascending and descending for every click.</p> <p>how should i write the code for that?</p> 2013-05-20T11:34:57-04:002013-05-20T11:34:57.297-04:00urn:uuid:00000000-0000-0000-0000-000005400876http://forums.asp.net/p/1908469/5400876.aspx/1?Add+dynamic+row+below+my+gridviewAdd dynamic row below my gridview Hey there I after I populate my gridview , I wanna add a &quot;add&quot; button on the footer So I can add new data when it's running . What would be the easiest way to do this ? 2013-05-21T10:58:33-04:002013-05-21T10:58:33.033-04:00urn:uuid:00000000-0000-0000-0000-000005399142http://forums.asp.net/p/1908089/5399142.aspx/1?Post+Back+Issue+Post Back Issue. <p>I am not sure I am doing this correctly. I have few controls hidden and they appear depending on the value selected from a drop down control. Think my postback isn't correctly setup because I try to add an item on postback which doesn't appear unless I select one value then it appears. As I am hosting this without web hosting company I've had to add this to my page:&nbsp;EnableEventValidation=&quot;false&quot;.&nbsp;</p> <pre class="prettyprint">&lt;asp:UpdatePanel ID=&quot;updatepanelGender&quot; runat=&quot;server&quot; UpdateMode=&quot;Conditional&quot;&gt; &lt;ContentTemplate&gt; &lt;p&gt; &lt;label for=&quot;gender&quot; style=&quot;font-weight: bold&quot;&gt; Gender&lt;/label&gt; &lt;asp:DropDownList ID=&quot;ddlGender&quot; runat=&quot;server&quot; AutoPostBack=&quot;true&quot; OnSelectedIndexChanged=&quot;ddlGender_SelectedIndexChanged&quot;&gt; &lt;asp:ListItem&gt;Male&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;Female&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;/p&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID=&quot;ddlGender&quot; EventName=&quot;SelectedIndexChanged&quot; /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt;</pre> <pre class="prettyprint"> protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { gender = ddlGender.SelectedValue; } }</pre> <pre class="prettyprint"> protected void ddlGender_SelectedIndexChanged(object sender, EventArgs e) { ddlGender.Items.Insert(0, new ListItem("Please select your Gender", "")); if (ddlGender.SelectedValue == "Male") { pnl.Visible = true; pnlHB.Visible = false;//female question pnlPB.Visible = false;//female question pnlBD.Visible = true;//male question pnlPH.Visible = true;//male question } if (ddlGender.SelectedValue == "Female") { pnl.Visible = true; pnlBD.Visible = false;//male question pnlPB.Visible = true;//female question pnlHB.Visible = true;//female question pnlPH.Visible = false;//male question } if (ddlGender.SelectedIndex == 0) { pnl.Visible = false; pnlBD.Visible = true; pnlHB.Visible = true; pnlPB.Visible = true; pnlPH.Visible = true; } } </pre> <p><br> <br> <br> <br> </p> 2013-05-19T22:23:56-04:002013-05-19T22:23:56.697-04:00urn:uuid:00000000-0000-0000-0000-000005402108http://forums.asp.net/p/1908771/5402108.aspx/1?Validating+BoundField+on+InsertValidating BoundField on Insert <p>When using ObjectDataSource is there a built in way to prevent Insert if one of the BoundFields is empty?</p> <p>Thanks.</p> 2013-05-22T11:05:31-04:002013-05-22T11:05:31.02-04:00