Dear All,
i am making web application using asp.net ,C# (Visual studio 2005).i have a web page with couple textbox conntrol and dropdownlist controls(Some of them autopostback is true). In order to check whether this control is not blank i use requiredfielfvalidator control. my problem is i want all required validator only check at save event event not whenever there is postback. that is let say textbox control having postback true only check all its previous required validator. Not succesor validator
Is it possible. if yes how can i do it . please guide me
public string testMethod()
{
return "Yes Iam here " + Sample.testMethod1();
}
}
public class Sample
{
public static string testMethod1()
{
return "Only";
}
}
I’ve created the dll successfully with the name Search.dll. Also i referenced this dll inside my new project. Now, whenever I load this in my page, testMethod() is being called, consequently the output is "Yes Iam here Only". That’s cool. But I should be in a position to override Sample.testMethod1()Wrapped inside the dll with my project’s App_Code class say class1.cs.
This is my new class within the project in App_Code/Class1.cs.
public class Sample
{
public static string testMethod1()
{
return "Only1";
}
}
I also tried virtual & override with testMethod1() being defined as non-static member of that class. Nothing works.
when asp page loads some text gets displayed in some cells of a table...
and i take inputs in a form on same page...and i used req. field validators..for that form validation..
when i click submit then validationsummary gets displayed...in response to invalid input..then on reset i clear out those cell elements in table as well as form elements using javascript...but i m not getting how to clear the errormessages in validation summary using javascript...
pls reply quickly
thanx in advance
There's never a Wronge Time To Do The Right Thing !!
Make sure the EnableClientScript is true (it is by default) if it then .NET takes care of rendering javascript and doing all the clearing. Also make sure the Display is set to dynamic.
hi,
I have a problem when rendering the page.
Iam using this method
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
}
Iam unable to findout the solution some times it is working fine and always it is showing specified cast is not valid.
our application like left navigation,if i click on that it will open corresponding page,in that page if i click any button,or select radiobutton or select dropdown then it is displaying the error.
i tried a lot in google.
and one more thing is it is working fine for others,mine is xp machine.
Please anyone help me out.
Hi All,
I m inserting values with the help of a Query in a table. There is a field named Company. I m using 'txtCompany' to insert the value to this field. Now the problem is that when Some One's Company Name like Jan's. Means the apstropy will give error. Any Suggession.
Example
INSERT INTO Delivery VALUES ('Company').
If company Name is "Shah's" then there will be error.
which database you are using?
if using sql: then when you write insert statment where you are passing vlues of that columns you must pass under [dfdf]
if you are using oracle this is not possible from user side. you must use regular expression to avoid apostrophy.
Creating Threads :Create new instance of Thread object. Thread constructor accepts one parameters which is delegate
Thread dummyThread = new Thread( new ThreadStart(dummyFunction) ); Executing Thread:
To run this thread us the method start provided by Threading namespace
DummyThread.Start (); Joining Threads:
There is always the requirement to join thread specially when a thread depends on some other thread for completing its task. Lets assume that DummyThread has to wait for DummyPriorityThread to complete its task and then run again. In this case we need to do the following:
DummyPriorityThread.Join() ; Suspending Thread:
This will suspend the thread for the given number of seconds
DummyPriorityThread.Sleep(
string strThread1;
strThread1 = "I am first thread.";
for (int i=0;i<5;i++ )
{
ListBox1.Items.Add(strThread1);
if(i==3)
{
pthread2.Join();
}
}
}
public void Thread2()
{
string strThread2;
strThread2 = "I am second thread.";
for (int j=0;j<5;j++)
{
ListBox1.Items.Add(strThread2);
}
}
I want to call pthread2.Join() in public void Thread1() but gives error
also i need to access pthread1 in public void Thread2()..How to do this?
thanks Apurva.
do u thinkis this statements are correct??
a DataSet will have all the data locally. However, this is both a curse and a blessing. It means all the data will have to be fetched before any work can be done, which may increase latency and memory usage substantially.
The Recordset is cached behind the scenes, so there will only be roundtrips to the server when needed to refill the cache.
BTW, in .NET the equivalent of a Recordset is the SqlDataReader (or equivalent for datasources other than SQL Server). It can return multiple results, but you have to process them one by one in order.
Most of the time a DataReader is the fastest method.
What exactly you want to know? These things are quite correct. Dataset follows a disconnected architecture. Once you get the data from the database you are disconnected. If you again want to update the dataset with the database you again need to get connected and update it. Here[^] you will get the details of ado.net architecture.
You can start with System.GC.Collect(). There is an overload that will allow you to specify the generation to collect also. I highly recommend you let the GC do things by itself because forcing garbage collection messes up its tuning and timing.