|
How we will show the number of visitors of particular site in asp.net with c#.when server is shutdown and then again restarted,it must show countinuity.I mean due to server problem,it must not begin from 0 .Actually i declared variable under Application_start in global.asax and it is incremented under Session_start.It works well but when server shutdown it again start from 0
bijesh
-- modified at 1:12 Friday 4th August, 2006
|
|
|
|
|
You can use database for that purpose.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi apurva
aavesh again,
I'm making a project in asp.net with vb,i have a page named as IndividualProperty.aspx.
I'm showing the listing of all the property one after it in the page.when any user select any property such as he select "abc" property, when he click on this Property the IndividualPropertypage will be called.that is ok.
but i want to change the URL from www.xyz.com/IndividualPropertypage.aspx to www.xyz.com/abc.com
meanwhile whatever the property he select property name must be replace the page name in the URL.
How is it possible,plz tell me thanx
|
|
|
|
|
In this case you have to rewrite the URL. You through this article this will be be of great help for you.
http://www.codeproject.com/aspnet/URLRewriter.asp
Best Regards,
Apurva Kaushal
|
|
|
|
|
Sir,
Can i programically calculate how to find the no of tables in the database.
Please help.
|
|
|
|
|
use this query
select * from sys.all_objects where type_desc='USER_TABLE'
|
|
|
|
|
If your database is Microsoft SQL Server 2000. Use this query
SELECT COUNT (TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'
Thomas
|
|
|
|
|
But this gives number of tables + 1.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I have a web app that searches AD to get Windows user details. The code for this is in a class that I either access directly from my web page or via a web service. It works when accessed from the web page but not via the web service.
This is the error I get when the web service attempts to run the code:
Server was unable to process request. --> The specified domain either does not exist or could not be contacted.
The code I'm using looks like this:
DirectoryEntry entryRoot = new DirectoryEntry("LDAP://RootDSE");<br />
string domain = entryRoot.Properties["defaultNamingContext"][0].ToString();<br />
<br />
<br />
DirectoryEntry searchRoot = new DirectoryEntry(@"LDAP://"+domain);
DirectorySearcher search = new DirectorySearcher(searchRoot);
The failure occurs at: string domain = entryRoot.Properties["defaultNamingContext"][0].ToString();
Any light that is shed on this issue will be greatly appreciated. Thanks in advance.
Arrogance and ignorance go hand in hand - Metallica
|
|
|
|
|
The following is my Web.config file
<br />
<location path="admin"><br />
<system.web><br />
<authorization><br />
<allow roles="Admin" /><br />
<deny users="*" /><br />
</authorization><br />
</system.web><br />
</location><br />
But in FormsAuthentications mechanism,I can't find how to and when to assign "Admin" role to Authenticate users.
Can anyone help me? Any idea will be appropriate.
|
|
|
|
|
|
hello all of you,
plz tell me...
i want to initialize the messenger object and constructor must be called only once. so where should i define the object, either in Page_Load() or in Page_Init().
plz clear me the difference between these methods.
|
|
|
|
|
Hi there,
What is the messenger object? Why do you want its constructor to be called only once? Depending on what you need then you can choose the right event to initialize the object, or maybe both events are all your options. You can read more about this in ASP.NET Page Life Cycle Overview [^]
Btw, "urgently required help" is not a good subject at all, the title should be something that best describes your issue just in a few words.
|
|
|
|
|
Hello!
I have a big problem. Since three days I am searching for an answer without finding any functional hint.
I created a website with Visual Studio 2005 Professional. On the page I used the Login Control from Microsoft.
So far everything works fine on my Computer.
After uploading to my Windows 2003 Standard Server I only get the following Message:
An attempt to attach an auto-named database for file
c:\inetpub\wwwroot\Demo\App_Data\aspnetdb.mdf failed. A database with the same name exists, or
specified file cannot be opened, or it is located on UNC share.
I even installed Visual Web Developer Express Edition on my Sever and it works in the Debug Modus but not with my IIS 5.2.
Please tell me what I am doing wrong.
Thank you very much!!!
What I have done so far:
1) I installed SQL Server Express Edition on my Server.
2) I created a virtual directory.
3) I uploaded my complete website, including the App_Data directory.
4) A lot of things that did not help any further.
|
|
|
|
|
|
Ok I have set up a checklistbox and then an arrow button to move each selection over to the next listbox when asked - What I want is to allow the user to change the order of the displayed list. I need to reindex the second list box inthe order that they are sent over by the arrow button but can't figure out the syntax:
I have this:
lbOutcomes1.Items.Clear()
Dim chkListOutcomesItem As ListItem
Dim x As Integer = 1
For Each chkListOutcomesItem In chkListOutcomes.Items
If chkListOutcomesItem.Selected = True Then
Me.lbOutcomes1.Items.Add(chkListOutcomesItem.Text)
'Me.lbOutcomes1.SelectedIndex = x
End If
x = x + 1
Next
But it chokes on the commented out line - how do I accomplish what I am trying to do - I want the user to arrange the order of this sentences - this order will be saved back into my database and the table headers that will generated will appear int he order they selected. I need to figure this out ASAP as they want to roll out this sytem and I need to be able to allow column selection and moving them around.
Thx, Tammy
|
|
|
|
|
Hi, I use VS2003 asp.net 1.1 C#
I am working on bilingual website and I would like to use by exemple 2 files like career_fr.txt and career_en.txt that I will include in my html code based on the language. In html we use to write and works fine but when i want to switch the language it comes a problem for me.
I know that we can use .resx (ressource file) and that's what I do for short sentence or label. By using files.txt or files.inc that I can access based on language will be easier to edit for the non programmer.
Any suggestion will be wellcome.
Thanks for help,
Davy
|
|
|
|
|
IMHO, there are a couple of options that you may consider to include a text file in the ASP.NET:
+ Place a container such as Label, Literal ... controls in the web page, and dynamically load the text file based on the selected language and assign the content to the container.
+ Create a web user control and include it it the web page instead of the #include syntax.
|
|
|
|
|
Hi minhpc_bk,
Thanks for your suggestion.
Based on it I Resolved my problem with some little variances. I put a label on the web page and in C# side I created an object streamReader, I read my txt file and I assigned it to my label. In the C# code I switched between french and english based on what the user choose.
Thanks again
Davy
|
|
|
|
|
Hello there,
I have built as .aspx page. I have a situation to create 4 panels in
a . Based on the selection of a drop down I need to display
the corresponding panel in that table cell. Every thing works fine but
I see a lot of space in the table cell that was occupied by the other
panels though they are being hidden.
Can any one help me how to remove the space ? I dont' know how to use
style sheets or even do not if the the DIV functions works and how to
use it.
Here is a sample table code snippet with panels inside the table cells
for you to simple put some code to show me.
drop down selection |
<asp:panel1>
<asp:panel2>
<asp:panel3>
<asp:panel4>
|
Any inputs are greatly appreciated.
Thanks
-L
|
|
|
|
|
Learn how to use style sheets and divs. You already knew the answer!
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
I need a starting point. I appreciate your encouragement and thats how we learn.
Thanks
-L
|
|
|
|
|
Hi,
Can any1 plz tell me how to change the title of an aspx page at runtime using ASP.NET.I dont want to hardcore the title but depending upon the login id, i want the title of the page to be changed at runtime.
Urgent help is needed.
Thanks,
Riz
|
|
|
|
|
Didn't get an immediate answer to your previous question?
Changing the title and reposting I'm sure will definately get a better response.
only two letters away from being an asset
|
|
|
|
|
this.Page.Title = "IntelliSense FTW!"
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|