|
HI,
First say your are cerating an Windows based or Web based form??? and the platform you use
Know is Drop, Unknown is Ocean
|
|
|
|
|
|
make one for loop which counts all objects in ur page and inside on loop ask if control is textbox if so delete text property of control.
|
|
|
|
|
This will do it.
void SetAllInputControlsClassName(Control parent,
string className, string focusClassName)
{
foreach (Control ctl in parent.Controls)
{
if (ctl is TextBox || ctl is ListBox ||
ctl is DropDownList)
{
//Do stuff here
}
}
}
|
|
|
|
|
thank u for helping but i have aproblem
i iwant to clear all textbox but the
ctr.text not avalid
|
|
|
|
|
Sorry, I sent the wrong code snippet.
Try this:
private void Button1_Click(object sender, System.EventArgs e)
{
ClearAllControls( Page.FindControl("Form1"));
}
void ClearAllControls(Control parent)
{
TextBox tb = null;
foreach (Control ctl in parent.Controls)
{
if (ctl is TextBox)
{
tb = (TextBox)ctl;
tb.Text = "";
}
}
}
|
|
|
|
|
Hi Everyone,
I am c# Beginner, can u plz solve my problem like "thread was being aborted" when using try catch(Response.redirect();)
suresh babu.k
|
|
|
|
|
|
Hi Suresh Babu,
Welcome.
With Regards
Satips
|
|
|
|
|
Try google? Google search...[^] First result has your answer, you can't transfer thread control in a try catch block.
|
|
|
|
|
hi ok,
Plz solve my problem
suresh babu.k
|
|
|
|
|
|
|
Hi,Friends
Iam a fresher in .net,Any body plz tell me how to open a notepad which is in a fixed location on the system,and how to add the text presented in the notepad to the mailbody.
I am waiting for the Reply
Thanks&Regards
Srilakshmi
|
|
|
|
|
You can't execute client side apps from a web app...
|
|
|
|
|
Hi Steve
Thanks for your reply.Actually my requirement is i have a button,when i click that button a mail is send automatically,for that i used outlook com component,and the mail body is comman to all people
how to create a body template ,and how can i use in the body field
Thanks&Regards
Srilakshmi
|
|
|
|
|
You can use dos batch file to create and edit notepad or word document or
any other type of document...
Then run the batch file on any button click using system.diagnostics.process..
If you fail for the first time , call it version 1.0.
|
|
|
|
|
I think module file does not exist in asp.net 2.0 with vb.net 2.0.If it does not exist then Is there any substitution for the module file that was previously in 2003 asp.net?
|
|
|
|
|
The module item template is not available in the web site project, you can use the class template instead. If you use the Web Project 2005, you can see the module item template.
|
|
|
|
|
i have a gridview and i want to delete items from that gridview but i want to do that with the help of one delete buttonj
Just like it is in the case of mails. all this with asp.net 2.0
Regards
|
|
|
|
|
in your datagrid have a template column. the header template of the template column must have a check box so the when we click that the check boxes of the item template will get seleted. and the have a button as delete selected.
Nizha
|
|
|
|
|
is this button "delete selected. " in bulid or i have to write the code for this. if u can help with this
Regards
|
|
|
|
|
Add the delete button in template column.
In Initialise_components,
wire the delete link for the datagrid.
datagrid.deletecommand = ....
(press tab twice)
Them write the code to delete the row in the function generated.
If you fail for the first time , call it version 1.0.
|
|
|
|
|
U have a template column then u can easily delete teh record
suresh babu.k
|
|
|
|
|
i am working on a project in asp.net and all pages contain the same banner ans navigation links. i would like to save this banner and links in a seperate file and include them in all other pages. can you help me...........
Nizha
|
|
|
|