|
Try this:
<asp:Textbox Text="" EnableViewState="false" />
|
|
|
|
|
Not Working.....Thanks for reply
|
|
|
|
|
How are you saving the data? How is the data getting in the textbox in the first place? If the textbox starts off empty and the user enters the data, you click a button to save and the page reloads you could put some javascript at the bottom of the page to blank it out on client page load.
<asp:TextBox ID="txtThing" runat="server">
<script type="text/javascript">
document.getElementByID('<%=txtThing.ClientID%>').value='';
</script>
|
|
|
|
|
Hey actually i m using a user control and add this controls in it. However how i detect the user control reloads?........
|
|
|
|
|
It may be browser's 'autocomplete' feature filling it in.
You can switch it off by using:
<asp:TextBox Runat="server" ID="Textbox1" autocomplete="off" EnableViewState="false"></asp:TextBox>
|
|
|
|
|
Not Working............
|
|
|
|
|
No, disabling ViewState would not make the text go.
As far as I know, text property of a TextBox is preserved using ControlState and we do not have control over it.
Sandesh M Patil wrote: When i save data Present in the textboxes i want to clear the textbox
You must be posting the values to the server to save the data. After you save it add a line:
txtTextBoxName.Text = "";
I hope this helps!
..Go Green..
|
|
|
|
|
Hi,
I have a GridView control which is currently bound to an object which contains a DateTime property, "Survey Date". As the GridView width is limited, I want to display a checkbox instead of a DateTime to indicate that the survey has taken place. The survey is deemed to have taken place if a value has been entered for the survey date/time.
I can't bind a checkbox property using the DateTime in the GridView row can I? Somehow I'd have to check the DateTime object and if valid, set the checkbox to true and false otherwise.
Any ideas welcome!
|
|
|
|
|
Bind Your check box like this
<ASP:CkeckBOx ID="Chk1" runat="server" Checked='<%#Convert.ToDateTime(Eval("Surve_Date", "{0:dd/MM/yyyy}").ToString() == "01/01/0001" ? false: true) %>' />
|
|
|
|
|
Thanks, I made a minor change to remove the ConvertToDateTime() call and it works just fine
|
|
|
|
|
I have 12 textboxes controls and 5 dropdown lists in web page. I want to assign a common style to textboxes and common style to dropdown lists.
I dont want to assign a class to each <asp:textbox> control
wheather i can do this
TextBox
{
font-family:Verdana;
font:30px;
font-weight:normal;
}
however this is not working..
Please Suggest......
|
|
|
|
|
Can you provide a bit code to understand the problem ?
The CSS and which property of textbox you used to assign the css class. (To understand why it fails)
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
WebPage.aspx
<table cellpadding="2" cellspacing="0" border="0" width="50%">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2" class="UserHeading">Enter User Information</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><label id="lblUserName" runat="server">User Name</label></td>
<td><asp:TextBox ID="txtUserName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><label id="lblPassword" runat="server">Password :</label></td>
<td><asp:TextBox ID="txtPassword" TextMode="Password" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><label id="Label1" runat="server">Email Id :</label></td>
<td><asp:TextBox ID="txtEmailId" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><label id="Label2" runat="server">Address :</label></td>
<td><asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><label id="Label3" runat="server">Contact No :</label></td>
<td><asp:TextBox ID="txtContactNo" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><asp:Button ID="btnSave" runat="server" Text="Save" /></td>
</tr>
</table>
stylesheet.css
.UserHeading
{
font-family:Calibri;
font-size:20px;
font-weight:bold;
}
TextBox
{
font-family:Verdana;
font:30px;
font-weight:bold;
}
label
{
font-family:Verdana;
font:11px;
font-weight:normal;
}
label style applies to all labels. Similarly i want to apply to <asp:textboxes>
Please Suggest.........
|
|
|
|
|
try in this format
apply class to table
.table td input
{
font-family:Verdana; font:30px; font-weight:bold;
}
|
|
|
|
|
Thanks........ It works but it doesnot apply to Multiline Textbox id="txtAddress"........
|
|
|
|
|
Multiline textbox doesnot render as input. It gets rendered as TextArea, so provide css for TextArea then it will work
|
|
|
|
|
Thanks............
|
|
|
|
|
your welcome
|
|
|
|
|
i am using masked edit extender and modal pop up extender controls .it wrks fine . now i need use a user control in the same page. the problem is ,after i added user control , the ajax extender controls doesn't work .however no error occurs when i browse the page.
please anybody help me .
|
|
|
|
|
This shouldnt be a problem. Can you post the code of your page maybe? Exclude unnecessary parts.
Maybe there is some mixup with the tagnames/tagprefixes in the registration part of this controls
in your page?
|
|
|
|
|
Hi all
Im using multi select drop down list from following link..
multiselectdropdown
It is working fine locally. But in remote server getting javascript error when i try to select list items....
Help me...
|
|
|
|
|
Let me know what error u r getting ...
Try in Firefox and see what error is there in Error console.
Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution. Visit My Website-->www.abhisheksur.com
|
|
|
|
|
Error message
read check box list is not defined
|
|
|
|
|
See below link it may help u.......
Link
|
|
|
|
|
Hi.
I would like to start a timer in my asp.net application, which starts when the page loads, or a button is pushed or whatever.
The timer should then be triggered once every day. Even if no clients/browsers are connected to the server. The idea is that the server should spit out an e-mail every day.
Is this possible? And how is it possible?
Thanks alot!
|
|
|
|