|
private void Reset()
{
Control myForm = Page.FindControl("Form1");
foreach (Control ctl in myForm.Controls)
{
if (ctl.GetType().ToString().Equals("System.Web.UI.WebControls.TextBox"))
((TextBox)ctl).Text = "";
}
}
---Hope it helps...
JJ
|
|
|
|
|
I saw you got a few answers to your question, however it seems (without the intention to criticize the others responses) that none of them solve the given task in all scenarios. Problems may arise due to the fact, that for each Control the Controls collection only contains its child controls but not the children of the child controls. This can cause problems if the nesting of the TextBoxes is deep. A simple case of this would be if the TextBox was inside a TableCell. Iterating through the Forms controls can only get you the Table object, and even if you iterate through Tables controls, you only get TableRows. The correct solution is to iterate through the Forms children, then through its childen's children and so on. A recursive algorithm if you like. Something along the lines of:
void ClearTextBoxes(Control control)
{
foreach (Control child in control.Controls)
{
if (child is TextBox)
((TextBox)child).Text = String.Empty;
else
ClearTextBoxes(child);
}
} Obviously if the nesting does not run deep than you don't need this kind of precision.
|
|
|
|
|
Its possible to sho msg box in asp.net with out javasctipt?,
If there plz send me the code....,
Magi
|
|
|
|
|
I hope not.
Regards,
Satips.
|
|
|
|
|
|
This is pretty good concept of showing MessageBox
|
|
|
|
|
Magh_M wrote: with out javasctipt?,
it pretty much good que, but without javascript, you can use VBscript,
but without scripting
i don't think we can do.
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi,
My webpages are flickering/Blinks during post backs.... in both IE7.0 and Firefox.
Its working fine in IE6.0....
Plz Help.
~JJ
|
|
|
|
|
Page.SmarNavigation = true;
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
It's working now... in IE 6.0, 7.0. Problem remains in Firefox.
I kept it in web.config
<system.web>
<pages smartNavigation="true"/>
</system.web>
Thanks U Sylvester,
Regards,
JJ
|
|
|
|
|
this query when exceuted on oracle client does show the data:
select sum(locked_items) as locked_items ,sum(total_item_count) as total_item_count , sum(failed_item_count)as failed_item_count from ita_job_audit where to_date(job_created_on,'dd/MM/yyyy') = to_date('13/06/2007', 'dd/MM/yyyy') group by worker_process_oid
but when exceuted from my asp.net application...donn get any data in the dataset..here the code:
OracleConnection conn = new OracleConnection();
DataSet ds = new DataSet();
OracleDataAdapter adapter= new OracleDataAdapter();
adapter.SelectCommand = new OracleCommand(@"select sum(locked_items) as locked_items ,sum(total_item_count) as total_item_count, sum(failed_item_count)as failed_item_count from ita_job_audit where to_date(job_created_on,'dd/MM/yyyy') = to_date('13/06/2007', 'dd/MM/yyyy') group by worker_process_oid", conn);
adapter.Fill(ds,"Jobs");
My problem is with the date format in the query...if i put some other where condition (which has no date) then it gets the data...but with this particular where condition..it donn wrk...
its something to do with how dot net send data to the oracle client...
could anyone help me out here plz..
Thanks,
Dee
|
|
|
|
|
Try:
select sum(locked_items) as locked_items,
sum(total_item_count) as total_item_count,
sum(failed_item_count)as failed_item_count
from ita_job_audit
where to_char(job_created_on, 'dd/MM/yyyy') = '13/06/2007'
group by worker_process_oid I think your "to_date(job_created_on,'dd/MM/yyyy') " is causing the job_created_on column to be implicitely cast to a string (using the default date format) - before you convert it back into a date.
Note that I have not been able to test this because I don't have access to Oracle at the moment.
Regards
Andy
|
|
|
|
|
Thank you Andy...it worked!
i had tried so many ways but not this way...thanks again
|
|
|
|
|
i want one individual chat coding... in Dot Net... may with database or with out database..... like Google....
Sathiya
|
|
|
|
|
|
Can anybody tell me some site that should be converted in asp.net like some shopping site etc.
I want to make shopping site in asp.net.
Can anybody suggest me about this.
Kartik Rathi
|
|
|
|
|
Hey please name your subject with Suitable topic.
For more details about the Shopping cart Petshoppee[^] download this project and it will clearly give the explanation about all your needs.
Regards,
Satips.
|
|
|
|
|
Hello,
How can I show picture on crystal reports? Picture insert in table.
Thank you
|
|
|
|
|
|
hi...
i have a problem in datagrid.... as follows
table1
slno monthlypremium amount recovery type
2090 239908 0 abc
2 0 87534 23434 sfsdfsd
3 0 343 3434 fsdfsd
now the problem is when i diplay in datagrid it displays as follows...
but what i need is in monthlypremium the rows having 0 should have the value of recovery..
please help its very urgent
|
|
|
|
|
Hi
i didnt get ur question...
could u plz make ur question clear
wat do u mean of "value of recovery" ?
bye
naresh.s.s
|
|
|
|
|
value of recovery is nothing but the amount .... in table
|
|
|
|
|
|
once u verify the bounded colums Data Field, i think u could have interchanged the Data Field text...
Pradeep Reddy
|
|
|
|
|
Hi , I am trying to configure my SSL connection bazed on
this link [^]
but when I browse my page I only get message "Page can not be displayed".
can anyone tell me how can I configure SSL connection on IIS to be able browsing website sucessfully.
Regards.
I Love SQL
|
|
|
|