开发者

Not able to select text in textbox

I've got this here wizard step with a couple of text boxes. For some reason I cannot highlight/select the text in the textbox in IE or FF and I have no idea why, not even after spending a couple of hours googling the problem. I could really use another set of eyes on this. Let me know if you need more code to help.

<asp:WizardStep ID="wsPlanInfo" runat="server" Title="" StepType="Step">
                    <div style="width:100%; height:290px; margin-top:150px ">
                        <table border="0" style="margin:0 auto;">
                            <tr>
                                <td colspan="2" class="title">
                                    Placeholder text here?
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2"><asp:TextBox runat="server" ID="txtLearningPlanName" Width="300px" CssClass="input-text"  /> <asp:RequiredFieldValidator runat="server" ID="rflLearningPlanName" ControlToValidate="txtLearningPlanName" ErrorMessage="*" CssClass="validator" /><br /><br /></td>
                            </tr>
                             <tr>
                                <td colspan="2" class="title">
                                    placeholder text here?
                                </td>
                            </tr>
                             <tr>
                                <td>&nbsp;</td>
                                <td>
                                    <table border="0"><tr><td><asp:RadioButton runat="server" ID="rbSpecificDate" GroupName="DeadlinePicker" Checked="true" /></td><td><UC:DatePicker runat="server" ID="ucSpecificDatePicker" RequiredField="false" /></td></tr></table>
                                </td>
                            </tr>
                             <tr>
                                <td>&nbsp;</td>
                                <td>
                            开发者_Python百科        <asp:RadioButton runat="server" ID="rbCustomUserFieldPlusDays" GroupName="DeadlinePicker" /> <asp:DropDownList runat="server" ID="ddlUserCustomFields" CssClass="input-text" /> plus <Telerik:RadNumericTextBox runat="server" SkinID="Normal" ID="rntbUserCustomFieldOffset" ShowSpinButtons="true" DataType="System.Int32" NumberFormat-DecimalDigits="0" Width="60px" Value="365" /> days
                                </td>
                            </tr>
                             <tr>
                                <td>&nbsp;</td>
                                <td>
                                    <asp:RadioButton runat="server" ID="rbPlusDays" GroupName="DeadlinePicker" /> <Telerik:RadNumericTextBox runat="server" SkinID="Normal" ID="rntbPlusDays" ShowSpinButtons="true" DataType="System.Int32" NumberFormat-DecimalDigits="0" Width="60px" Value="365" /> days from today
                                </td>
                            </tr>
                             <tr>
                                <td>&nbsp;</td>
                                <td>
                                    <asp:RadioButton runat="server" ID="rbNone" GroupName="DeadlinePicker" /> None
                                </td>
                            </tr>
                       </table>
                    </div>
                </asp:WizardStep>


Try:

((TextBox)wsPlanInfo.FindControl("txtLearningPlanName")).Text

It will search the Wizard Step's Control list for a textbox with that ID name. It then casts it as a TextBox and so you can then use the Text property.


Removing disableSelection(document.body) in my javascript solved my problem. Note to self, post entire code when asking a question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜