|
from ystrdy i m doing this only...after that i posted my question here..please help me
modified on Thursday, April 17, 2008 1:00 AM
|
|
|
|
|
There are two ways to approach this problem.
1) You can check out with your cellular operator for a subscription.
2) Check out a third party provider like http://www.smscountry.com/[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Yeah, because here in Australia, I know better than you what SMS providers exist in Delhi.
I recommend reading the article I link to in my sig.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I need your help and suggestions regarding NUnit in asp.net....I am trying to write NUnit test cases for my asp.net application...can anybody suggest me some good practise for writing that..or some good sample codes for that..I started working on that..but it's not going smmothly..specially while saving the data...like that...please help me...
regards
alex.
|
|
|
|
|
To test ASP.NET dependent code, you can use NUnitasp[^]. AFAIK, it's not good like the real NUnit. You can use NUnit itself to test your application, but you won't be able to include ASP.NET dependent code like Server.MapPath or HttpContext.Current etc. But you can test your class libraries and business rules. Also VS team system has some unit testing features, I guess that can be used to test ASP.NET applications.
|
|
|
|
|
exactly..i am planning to test classlibraries..do u have any idea about this...ie, writing test cases for class libraries
|
|
|
|
|
It's pretty straight forward. Have you downloaded NUnit ? Go through the get started section. Basically to get started, you can create a new project in your solution and keep all your test classes inside that. So you can avoid that class when you release your project.
|
|
|
|
|
Ys i already started..but i am stucked how can i write test cases for save functionality....
|
|
|
|
|
Your save function should have a return type, either bool or maybe int. You can assert that correct data passed to the save function will return true (in case of bool, or a 0 for int) and for bad data a return of false (or a specified error code for ints). You could always have a custom return type if you wanted.
|
|
|
|
|
Hello all,
I want to be have a dropdownlist and its item for example is:
10000-20000
20000-30000
30000-40000
I want when i click on one of them,a collection of item comes with the its price range.
how i can do this?
how i should design database for this aim?
please help me,
thank you,
Hoda
|
|
|
|
|
create some tables in your database
(SqlServer: )
Table brackets
Fields
ID (seed, int),
bracketMin (money),
bracketMax (money)
Table Products
Fields
ID (seed, int),
bracketID (int),
Description (nvarchar(50)),
Price (Money)
Queries:
for your dropdown:
SELECT ID, Convert(varchar, bracketMin) + '-' + Convert(varchar, bracketMax)
FROM Brackets
For your gridview to display the prices
SELECT ID, Description, Price
FROM Products
Where bracketID = dropdown.selectedvalue
|
|
|
|
|
good solution, but you dont need to store the bracketId in the products table - and this is a bad idea if you ever change the bracket min/max it might invalidate this value.
<br />
SELECT ID, Description, Price<br />
FROM Products<br />
INNER JOIN brackets ON product.price BETWEEN brackets.bracketMin AND bracket.bracketMax<br />
WHERE bracketID = {dropdown.selectedvalue}
|
|
|
|
|
Dear Friend,
thank you very much for you response.
|
|
|
|
|
hai,
here i am updating 100 records at the same time.
when the update fails, the record is to store in a log file (.txt).
how to implement.?
FOR EXAMPLE.............
try
{
for (i=1;i=5;i++)
{
int a=i;
sqlinsert="update tbl_name set loop_no=a where rollnumber=a";
cmd = new SqlCommand(sqlinsert, conn);
}
}
catch(SqlException ae)
{
strreturn += "<br>Message: " + ae.Message.ToString();
}
How to capture the failure records for the above UPDATE statement?
HELP ME!
i m using ASP.NET with C# (.net 2005, 2.0 framework)
modified on Wednesday, April 16, 2008 8:40 AM
|
|
|
|
|
Hi John Sundar,
In the try block yau have a statement
try
{
cmd.ExecuteNonQuery();
}
Catch(Exception ex)
{
// In the catch block write file streams to write the file and in the file write roll no which not updated.
}
|
|
|
|
|
could u provide me an example senthil? for my QUESTION?
|
|
|
|
|
After You enter
try
{
cmd.ExecuteNonQuery();
}
catch(Exception ex)
{
FileStream fs;
StreamWriter sw;
fs = new FileStream("practice.txt", FileMode.Open );
sw = new StreamWriter(fs);
// write a line to the file
//In this line you concatenate the data
string newLine = "Not so different from you and me";
sw.WriteLine(newLine);
// close the streams
sw.Close();
fs.Close();
}
|
|
|
|
|
try
{
cmd.ExecuteNonQuery();
}
catch(Exception ex)
{
FileStream fs;
StreamWriter sw;
fs = new FileStream("practice.txt", FileMode.Open );
sw = new StreamWriter(fs);
// write a line to the file
//In this line you concatenate the data
string newLine = "Not so different from you and me";
sw.WriteLine(newLine);
// close the streams
sw.Close();
fs.Close();
}
-----> i dont want to store a single line in the practice.txt. i need to store the record values which is failed (i.e.. 100,200) as mentioned in my example.......
How to achieve it?
thanks in advance
|
|
|
|
|
Whether you are entering the values in the textboxes(Roll No) for updating the records.
|
|
|
|
|
no senthil, i m taking those roll numbers from an excel file and processing.... i will pass the roll number one by one. when it failed, i want to store it........
how to achieve it?
|
|
|
|
|
How will you take from excel file can you send me the code?
|
|
|
|
|
hai,
here i am updating 100 records at the same time.
when the update fails, the record is to store in a log file (.txt).
how to implement.?
FOR EXAMPLE.............
try
{
for (i=1;i=5;i++)
{
int a=i;
sqlinsert="update tbl_name set loop_no=a where rollnumber=a";
cmd = new SqlCommand(sqlinsert, conn);
}
}
catch(SqlException ae)
{
strreturn += "<br>Message: " + ae.Message.ToString();
}
How to capture the failure records for the above UPDATE statement?
HELP ME!
i m using ASP.NET with C# (.net 2005, 2.0 framework)
|
|
|
|
|
Hi,
You can use this logic. I hope that this may help you
int b = 0;
string ew;
for (int i = 0; i <= 5; i++)
{
try
{
if(b==i)
ew=Session["Good"].ToString();
Response.Write("pass" + i);
}
catch
{
Response.Write("Failed" + i);
}
}
Cheers..!
Vijay s
|
|
|
|
|
for (i=1;i=5;i++)
{
int a=i;
sqlinsert="update tbl_name set loop_no=a where rollnumber=a";
cmd = new SqlCommand(sqlinsert, conn);
try
{
cmd.ExecuteNonQuery();
}
catch(Exception ex)
{
FileStream fs;
StreamWriter sw;
fs=new Filestream("logfile.txt",FileMode.open);
sw=new StreamWriter(fs);
string newline="Roll No:"+a+"was not updated";
sw.close();
fs.close();
}
}
I think you understand, if you have any doubt ask me.
|
|
|
|
|
once if its go for "CATCH" block, how it can proceed others?
i.e, if record 2 fails, will it proceed other records and complete the whole FOR loop????
i tried.. but getting error...
how to achieve it?
thanks in advance and understanding....
|
|
|
|