|
Nunit test cases can be written for public methods in Business layer and data layer
steps to follow to write nunit test cases
1. first identify the public method in BL or DAL
2. identify the parameters that method accepts
3. create all the parameters in SETUP part
4. Create an instance of that class in TEST part
5. call that method and pass the parameters u have created in SETUP
6. check the out of that method in an assert statement
7. clean up the paramaters that u have created in SETUP
|
|
|
|
|
Thaks guys for your suggestion.
Don't Quit
|
|
|
|
|
How to call a function from database in c#.net.Pls write code
|
|
|
|
|
shobhapav wrote: How to call a function from database in c#.net.Pls write code
What does this have to do with ASP.NET. Database interaction is part of ADO.NET
By function I presume you mean a UDF written in SQL.
If the UDF returns a scalar value then something like this:
SqlCommand cmd = new SqlCommand(myConnection);
cmd.CommandText = "SELECT dbo.FunctionName()";
object result = cmd.ExecuteScalar();
If your UDF returns a table value then something like this:
SqlCommand cmd = new SqlCommand(myConnection);
cmd.CommandText = "SELECT * FROM dbo.FunctionName()";
SqlDataReader reader = cmd.ExecuteReader();
Both examples assume you have an existing and open connection set up already. However, since you have not provided very much information you'll have to be more explicit if you want better help. Either that or buy a book on ADO.NET
|
|
|
|
|
Dear All,
Iam using Visual Studio 2005.
I create a control in windows form, make it as a dll file, refer it on the website folder thru Asp.Net 2.0. It works well.
But if once i made change in the dll source , recompile it, then refer it on the same website folder thru Asp.Net 2.0, it does't works. I mean the control contained in the dll file is not even visible to the site(aspx file). What i made wrong? Please could any body solve this problem?
-- modified at 10:04 Saturday 23rd December, 2006
|
|
|
|
|
Hi All
i am facing one small but strange issue. I hope you guys can help me in correct direction.
I am storing user login/password information via using cookies. It worked fine firefox but in IE7 it is not working. Code is very simple.
a) I am using httpcookie.
b) Dim LoginCookie As New HttpCookie("LoginName")
c) LoginCookie.Value = Me.TxtLoginName.Text
Response.Cookies.Add(LoginCookie)
d) On Page load
Me.TxtLoginName.Text = Request.Cookies("Login")
Before you say i change the setting in IE7 -->privacy tab->advance->override
accept first party/third party and as well as accept session cookies.........
But still same code works in firefox but not in IE7....
Pl help.
Amit
|
|
|
|
|
Dear all
Can I access any Server control in Javascript function in .Net. And I want to update the Server controls values from within the Javascript function.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi,
All server control will be treated as html control after they render on a page, this is the basic idea to access the server control in javascript.
You can use the DOM(document object model), to access and modify the server control values.
For eg.
A server control(Textbox) named as "username".
Then
to modify the value,
document.getElementById('username').value="someuser";
to access the value,
alert(document.getElementById('username').value);
You can use it in any javascript function.
|
|
|
|
|
hi,
I 'm storing array in session how to assign that session to array on another page .I'm not able to typecast Session to array of int (or array of object).
Please guide.
Thank you.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
Dear all
Can I access any Server control in Javascript function in .Net. And I want to update the Server controls values from within the Javascript function.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
please do not post same questions again and again.
Vicky
|
|
|
|
|
hi All
I am create Qurey like " SELECT c_EmpFName As Name,c_EmpCode As Code, c_CardCode As CardCode, c_BankName AS BankName ,c_AccountNo AS ACNO, c_qualification AS Qual FROM dbo.t_EMPINFO WHERE (c_Softdelete = '1') ";
and Excute by using "OleDbDataAdapter" and fill the DataSet Object "ds"
now i want to bind this ds to crystal report object how can do it
Is any one Help me !!!!
thank !!
|
|
|
|
|
Can I access any server control or variable at client side in a Javascript function. If possible please give me some code snippet.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hello,
I will change the Default Reporting Website from Microsoft .
Is this Possible,or not?
I have Problems with the Abbonements by the Users.
When the User selected a Abo, the Email was send to the wrong User.
The Setting in the User Account in the Active Directory is not the Emai lAccount from the User.
Sampl:
The email was send to User@test.local.com but the User has a Email : User@tester.com as Sample.
The AD Admin doesn't Change the Setting because is a Default Setting from the company!!!!
The Abo was saved in the Reporting Database ?
I have think i change the Website and make a own Input field from the Email with the Right @xcxc.
Please Help me.
|
|
|
|
|
hi,
How to download a file using client Call back concept
kamalnath
|
|
|
|
|
I have created a public class in my application and created number of variables.Now i am able to use all the variables in all my forms.
The samething is working with "Module" also."Module" can be cteated like "class" in asp.net.In "class" we have finalize().
problem is how to dispose the created variables in "module"???can we create user defined functions in module also???
kissy
|
|
|
|
|
Dear All,
I am new to dotnet world. Currently i am making web application using C# and Asp,.net(Visual Studio 2005). I wanted to know Is it possible to provides help in web form. that is if there is userid textbox. How can i provides his detail in some form as we use to do in application.
if Yes . Please give me some link or Guide me.
Thanks
regards
imran khan
|
|
|
|
|
Hi Imran,
You have to put some text link or button for that text box and click on that it should open help page.
You can hard code or use database for help, using specified help id it will fetch record and display in that help page.
Regards,
S Kumar
|
|
|
|
|
how does cookieless = true work.What is the advantage.
Can anyone help me
|
|
|
|
|
Dear all,
Is it true that if we use more than 5 session variables in an aplication,is that causes slowdown the application???
if it is true,the wat we have to use to maintain the state of the varibles???
viewstate and label i know,apart from these three any other option???
Thanks in advance
kissy
|
|
|
|
|
Session varable stored on server memory their is no performance issue but using number of session variable is depend upon the server configarion and volume of user in appication.
Dinuraj
|
|
|
|
|
I have report in aspx format and I want to convert this aspx page to html format. so how can i convert this aspx to html format. Please help me to find the solution.
thanks in advance
|
|
|
|
|
u can use HtmlScraping. thts definately solve ur problem
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
i can;t understand why change a aspx to html.
you can print aspx
I think therefore I am
--~--~---------~--~----~------------~-------~--~----~
My Blog and Website:
http://www.cnblogs.com/pinzui/
http://www.pinzui.cn
http://jnlinux.org
--~--~---------~--~----~------------~-------~--~----~
|
|
|
|
|
hi,
u can easily do it by string reader n writer
make a template in .html both at source n destination
read the data from the source from string reader
store the data in a varible
replace in the destination file through writer
in btwn u have to go by complex coversion of string data type.
regard
shriya
|
|
|
|