I have these two text boxes on the same row, "txtbroker" and "txtacct1". I'm trying to make it so that if text is entered into the 1st text box, the 2nd one is REQUIRED.

<td><tnc:TextBox  id="txtbroker" savestatecontroltotarget="SSMainBusinessSave" columns="50" runat="server" /></td>

<td><tnc:TextBox id="txtacct1" savestatecontroltotarget="SSMainBusinessSave"  columns="25" runat="server" /></td>

Can anyone help please?

Hi there,

do the following
1) set the property of txtbroker : autopostback = true
2)in code behind, on the txtbroker_Textchanged Event add the code below

if txtacct1.text.length = 0 then
'show message: enter some data in txtacct1...
end if

Mark as solved if it helps !!!

I have these two text boxes on the same row, "txtbroker" and "txtacct1". I'm trying to make it so that if text is entered into the 1st text box, the 2nd one is REQUIRED.

<td><tnc:TextBox  id="txtbroker" savestatecontroltotarget="SSMainBusinessSave" columns="50" runat="server" /></td>

<td><tnc:TextBox id="txtacct1" savestatecontroltotarget="SSMainBusinessSave"  columns="25" runat="server" /></td>

Can anyone help please?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.