|
I agree with Michael. This doesn't really sound like a c#/vb interoperability issue. Is sounds more like permissions on your server.
|
|
|
|
|
What type of projects are these??I mean website,class liabrary.Explain the whole scenario in detail with project types.
|
|
|
|
|
which is the best way to handle session state in asp.net
|
|
|
|
|
vasanth kabbur wrote: which is the best way to handle session state in asp.net
Can you be more specific by what you mean by "handle"? Do you mean you have special needs in your environment and want some suggestions on persisting the session state?
If so, the answer really depends on your environment. For most of the applications I build, using the default in-process persistence works plenty fine.
This technet article[^] may be useful.
|
|
|
|
|
Dear all
i created a javascript function to control some divs visibility
i want to call that javascript function on page load in some cases and in other cases i don't want to call it... how can i do that?
Thanx in advance
Best Regards
3ala2
|
|
|
|
|
In your Page_Load server script, execute something like the following:
if (whatever condition)
ClientScript.RegisterStartupScript(typeof(Page),
"MyScriptKey", "MyJavascriptFunc();"
);
|
|
|
|
|
Thanx
That was helpful
Take care
Best Regards
3ala2
|
|
|
|
|
Hi There plz any one do help me
why it is not working with me the code
the Html code for datagrid is
<asp:label runat="server" text="<%# DataBinder.Eval(Container.DataItem,"UserID") %>" id="Label1">
now the problem is when i run the page it comes but when i click on Edit Button nothing change
i mean the update button doesn't come and so the TextBoxes plz any one help me
and if i put the OnCancelCommand and OnDeleteCommand and so the rest it gives me compile time errer so plz some one check it
i'm thankfull for ur help in advance
Nissren
|
|
|
|
|
Hi,
You might have bound the grid twice in code behind page after setting the edit index property to the grid.Please check it once. And, you have not mentioned the compile tme error when you try to write OnCancelCommand or OnDeleteCommand.
-Priya
|
|
|
|
|
As I mentioned in subject, I want to show my error page in new page. Old page should steel shows old data.
I write in applicationerror event in global, this:
response.write("window.open('errorpage.aspx')");
But there is a problem with it. The old page shows aspx error message displaying my code and exception. If I set custom error in config, my old page will be redirected to errorpage which is set in custom error tag.
If I use Server.ClearError() method, the old page will be clear entirely and shows blank page.
I WANT MY OLD PAGE TO SHOW MY OLD PAGE WITH USER CHANGES WHICH CAUSING ERROR AND THE NEW PAGE, SHOWS MY ERRORPAGE LIKE ERROR MESSAGE IN WINDOWS APPLICATION.
I don't want to handle my all errors by try catch. I want to handle all of them in allication error. Because I can find my latest exception by Server.GetLastError() method.
Please instruct me what to do.
Thanks
Rastgar
|
|
|
|
|
Hi all !
I have a NHibernate question and really need your help.
i have 2 tables with one-to-many relation like this :
-tblCategories with these fields:
catID int primary key ( reference category field of tblItems)
catName nvachar(30);
catDesc nvarchar(100);
-tblItems with fields
itemID int primary key
category int
itemName nvarchar(50);
itemPrice double;
Now i create a IQuery like this
IQuery q=session.CreateQuery("Select item.ItemID,item.Name,item.Price
from Item as item,Categories as cat
where item.Category.catID = cat.catID and
cat.ID=:_inputID ");
This query executes OK but the problem is that i don't know how to get the result as the datasource of a datagrid ( for example ). Can anyone help me???. I need it very much.
Thanks in advance
Merry chrismas and happy new year!!!
|
|
|
|
|
Guys,
I want the user to be able to select font (such as Bold, Italic, underline) and stuff like that from a dropdown list) and then I wanna apply these properties to all my page (all text). Now I'm doing something like this:
string font = string.Empty;
switch(ddl2.SelectedItem.Text)
{
case "Bold":
font = Convert.ToString(System.Drawing.FontStyle.Bold);
break;
case "Italic":
font = Convert.ToString(System.Drawing.FontStyle.Italic);
break;
}
myBody.Attributes.Add("Font", font);
Session["theColor"] = font;
This worked for changing the color of the entire page as I hard coded the colors hexa decimal values in the cases, but here these are enums, and can only be compared.
Anyways does anyone has any input on this???? I want this to happen when the user select from the DDL and on the button click event it should change the font.
Thanks
Tina
|
|
|
|
|
Hi, how can i know when the user refreshes the asp page? when he presses the F5 because i am havin a problem!! and when he press the back button as well? Thanks alot!!
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Hi all! I got to know about NUnit framework. This is what I got
NUnit is an open source unit testing framework for Microsoft .NET. It serves the same purpose as JUnit does in the Java world.
NUnit.ASP is an expansion to the core NUnit framework and is also open source. It specifically looks at expanding NUnit to be able to handle testing user interface elements in ASP.NET.
Example of an NUnit test fixture:
using NUnit.Framework;
[TestFixture]<br />
public class TestWikipediaExampleOfNUnit<br />
{<br />
[Test]<br />
public void TestMultiplication()<br />
{<br />
Assert.AreEqual(4, 2*2, "Multiplication");<br />
}<br />
}
My question is how can I use it to test my code or What do I need to test my code with NUnit.
Thanks
Don't Quit
|
|
|
|
|
Nitin1981 wrote: My question is how can I use it to test my code or What do I need to test my code with NUnit.
which type code did you want to test.
look at the nunit doc you can find what you need.
I think therefore I am
--~--~---------~--~----~------------~-------~--~----~
My Blog and Website:
http://www.cnblogs.com/pinzui/
http://www.pinzui.cn
http://jnlinux.org
--~--~---------~--~----~------------~-------~--~----~
|
|
|
|
|
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.
|
|
|
|