Advertisement
Advertisement
| 03.23.2008 at 10:55PM PDT, ID: 23263513 |
|
[x]
Attachment Details
|
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 03.23.2008 at 11:58PM PDT, ID: 21192215 |
1: 2: |
TextBox txt = (TextBox)ascx1.FindControl("textbox_in_control");
txt.Text = "New Text";
|
| 03.24.2008 at 08:06AM PDT, ID: 21193991 |
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: |
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="fast_controls_Default" %>
<%@ Register Src="CompView1.ascx" TagName="CompView1" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<script runat="server">
' put the ID in the controls
Sub toTheControls(ByVal sender As Object, ByVal e As EventArgs)
Dim txt As TextBox = CType(CompView1_1.FindControl("txtCompID"), TextBox)
txt.Text = ddlCompIDs.SelectedItem.ToString
End Sub
</script>
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="srcCompIDs" runat="server" ConnectionString="<%$ ConnectionStrings:FastSqlServer %>"
SelectCommand="SELECT [fcomp_comp_id] FROM [fcomp_mstr]"></asp:SqlDataSource>
</div>
<asp:Label ID="lblCompID" runat="server" Text="Complaint ID:"></asp:Label>
<asp:DropDownList ID="ddlCompIDs" runat="server" DataSourceID="srcCompIDs" DataTextField="fcomp_comp_id"
DataValueField="fcomp_comp_id" AutoPostBack="True" OnSelectedIndexChanged="toTheControls">
</asp:DropDownList>
<br />
<br />
<uc2:CompView1 ID="CompView1_1" runat="server" />
</form>
</body>
</html>
|