I am assigning data to labels in code behind
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table bgcolor="#580coc"style="width: 375px" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 97px; height: 28px; color: white;">Sales Executive
</td>
<td><asp:DropDownList ID="DropDownList1" runat="server" Width="104px" AutoPostBack="True" OnSelect="drawboundry('we')" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" >
</asp:DropDownList>
</td>
</tr>
<tr align="center"> <td colspan=2 style="color: white;">Coolers</td></tr>
<tr align="center">
<td colspan=2>
<asp:ListBox ID="lstcooler" runat="server" Width="136px"></asp:ListBox>
</td>
</tr>
<tr align ="center" >
<td colspan=2 style="height: 31px" align="left">
<input id="Button1" type="button" onclick="getcooler('str');getBoundries('I');"
value="Load" style="width: 104px" />
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
<asp:Button ID="btnshowinfo" runat="server" Text="Show Information"
Width="128px" /><br />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender2" runat="server" BackgroundCssClass="modalBackground"
DropShadow="true" OkControlID="btnOk" OnOkScript=""
PopupControlID="Panel2" PopupDragHandleControlID="Panel4" TargetControlID="TextBox1">
</ajaxToolkit:ModalPopupExtender>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
----------vb code--------
Protected Sub btnshowinfo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnshowinfo.Click
Dim sql As StringBuilder = New StringBuilder()
sql.Append("SELECT ITEM_NAME,ASSET_TAG,ADDRESS,PHONE_NO,GCC_CODE,LAST_SERVICE_DATE,NEXT_SERVICE_DATE,AVG_SALES,NO_COMPLAINTS")
sql.Append(" FROM COOLERDETAILS")
sql.Append(" WHERE OUTLET_NAME='" & lstcooler.SelectedItem.Text & "'")
Dim row As DataRow = Db.GetDataRow(sql.ToString())
lblItemName.Text = row("Item_name").ToString()
lblAssetTag.Text = row("Asset_tag").ToString()
lblAddress.Text = row("Address").ToString()
lblPhoneNo.Text = row("Phone_No").ToString()
lblGccCode.Text = row("GCC_code").ToString()
lblLastService.Text = row("Last_service_date").ToString()
lblNextService.Text = row("Next_Service_Date").ToString()
lblAverageSales.Text = row("Avg_Sales").ToString()
lblNoOfComplanints.Text = row("No_Complaints").ToString()
ModalPopupExtender2.Show()
End Sub
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60:





by: meispiscesPosted on 2009-07-04 at 04:05:01ID: 24776597
How are you assigning the data to the labels?
please post the HTML code of modal popup. I want to have a look into that....and then could i solve your problem correctly
thanks