|
Are you serious about creating a separate database for each user? For any other purpose than making it hard to access the data, that's pretty useless.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
hi there,
There is no point of making database for each user. You should know a database can hold millions of table and records. So, there is no need to create database for each and every user. Rather use single database structure with primary and foreign key concept.
I have a simple advice to you. Make a table name "Users" with (User id as Primary key) and all the necessery information should be stored in another table which hold foreign key reference to User id field of User table. And all the table should be stored in the single database.
Hope this help you.
Dilip Kumar Vishwakarma
|
|
|
|
|
In my site there s a master page.there is a treeview on it.i have 3 kids of products.i gave to treeview 3 nagivateurls. when i click to one of these links so i want to show related pictures.how can i do like this project?is there any asp.net video about this topic?or is there any people who can explain how to do it
|
|
|
|
|
Have the views goto other pages and show the related pictures.
If that is not what you are wanting, try to go into better detail, possibly with better english.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi,
We're trying to set the appearance of an asp:CreateUserWizard control to have a custom background image but without success.
We tried to work with this object's style->background property but the images cannot be seen.
Does anybody have a clue?
Thanks in advance.
Snir_ya
|
|
|
|
|
Hello,
Try using CreateUserButtonImageURL and let me know if this helps or not.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
I have a table with a varchar field that uses the default character set latin1. In that field most values are in ascii but a few are not. Whenever I retrieve those values that contain non-ascii characters and try to display them on a webpage they show as garbage. I tried many things, like using charset=latin1 in the connection string, but nothing worked. Even tried to save the values to a text file and got the same results (using File.CreateText() and StreamWriter.Write(), which use UTF-8)
Environment info:
ASP.NET 2.0
MySQL 5.0.41 community
MySQL Connector/Net 5.1
response and request encoding set to utf-8 (default) in web.config
Any suggestions are very much appreciated ...
|
|
|
|
|
?dear all,
requiredfieldvalidator doesn't work properly within updatepanel, when i use it outside of the updatepanel it works, but within the updatepanel and with the validatorcalloutextender it doen't work properly, can u help me please
Web Developer @ Silverkey Egypt
|
|
|
|
|
how to display message in Message box in asp.net with c#
|
|
|
|
|
Use the javascript alert method.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Here is a simple procedure that dynamically builds a Javascript Alert Message and writes it to the client using Response.Write . you can use this procedure by adding it to the code-Behind . This would be useful when you do a server-side validation and want to prompt a alert message to the user.
protected void MessageBox(string strMsg)
{
string strScript = "<script language=JavaScript>";
strScript += "alert('" + strMsg + "');";
strScript += "</script>";
Response.Write(strScript);
}
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Page.ClientScript.RegisterStartupScript(Page.GetType(), "@msg", "alert('Message that u want to display...');", true);
Jintal Patel
|
|
|
|
|
In order to save bandwidth, I set the viewstate to serverside using the method discribed here:http://msdn2.microsoft.com/en-us/library/system.web.ui.sessionpagestatepersister.aspx[^]
It all seems to work well, pagesize has shinked up to 60-70%. On my local server everthing works as it should. However, when I put it on the live server, problems arise. When I am using dynamic content, and I wait too long (about 10 seconds), the viewstate gets lost somehow, and an error occurs. The error message I get is: System.NullReferenceException. When I react within these 10 seconds there are no problems. The session state settings are:
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/>
Does anyone have an idea what can cause this?
|
|
|
|
|
Hi,
In DayRender Event of a calendar, I have bind data to a radioButtonList:
rblTimes.DataTextField = "Time";
rblTimes.DataValueField = "Time";
rblTimes.DataSource = dtFreeTime;
rblTimes.DataBind();
that dtFreeTime is a DataTable that I filled it in above event,(It must fill dynamically, related to calendar and the data is not from DB. It's some numbers that calculate related to calendar).
Now, In Click event of a button, I want to know which item of radioButtonList is selected,but it always return -1 for selectedIndex.
I think because the datasource of radioButtonList is dynamic, it disposed and selectedIndex is missed.
now, How can gain the selectedIndex?
Best wishes
|
|
|
|
|
May be you should maintain the dtFreeTime DataTable in the Session or whatever. Bind it whenever it is necessary.
|
|
|
|
|
Have you tried ViewState? Also, are you putting RadioButtons on each row in the DataTable? If so, you just need to find out which DataTableRow was clicked and get the instance of the RadioButton on that row.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Have what we believe to be an issue with caching in master pages or IIS or C# in general. We have a site where we give X number of resources to a user per day. In this example we are giving them 100 Wheat for every Farm they have per 24 hour period.
We store the last DateTime.Now.Tick value in their user profile in the SQL database. When they refresh a page, it reads the current DateTime.Now.Tick value and compare the two and then do the following math to compute hoe much more production they should have.
dLogs = ((dtNow.Ticks - lLastUpdateTicks) * production / (864000000000.0 * Globals.PERIOD));
This formula of course works but I have to refresh the page twice to get the proper values. The first time I refresh it gives me just a few ticks update worth of the Wheat. Here is the begining of the function...
<br />
public GameEvents(int UserID)<br />
{<br />
intUserID = UserID;<br />
dtNow = DateTime.Now;<br />
<br />
SqlDataReader rdr = null;<br />
SqlConnection connection = null;<br />
<br />
try<br />
{<br />
string szConnection = System.Configuration.ConfigurationManager.AppSettings["SQLConnection"];<br />
<br />
connection = new SqlConnection(szConnection);<br />
<br />
string szQuery = "SELECT LastUpdate FROM King WHERE (ID = @UserID)";<br />
<br />
SqlCommand cmd = new SqlCommand(szQuery, connection);<br />
cmd.Parameters.AddWithValue("@UserID", intUserID);<br />
<br />
connection.Open();<br />
<br />
rdr = cmd.ExecuteReader();<br />
<br />
while (rdr.Read())<br />
{<br />
lLastUpdateTicks = rdr.GetInt64(rdr.GetOrdinal("LastUpdate"));<br />
}<br />
So we get the current DateTime and the value out of the database of our last update and then do the following math to compute the resources they should have gained as follows...
<br />
<br />
dLogs = ((dtNow.Ticks - lLastUpdateTicks) * production / (864000000000.0 * Globals.PERIOD));<br />
<br />
We should not have to refresh twice to get a complete update. We know it is the DateTime issue and believe it is a cache issue or something like that as the resources are updated a few ticks with the first refresh which tells me that it is not just failing to run the code. Then on the second refresh it updates to where it should be as far as number of resources.
Guess the net of the question is: "Does master pages or IIS or whatever it is cache this DateTime.Now() and not go out to the system each and every time?" If not what else coudld be the problem!
Any help would be greatly appreciated!!!
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Expert Coming wrote: Guess the net of the question is: "Does master pages or IIS or whatever it is cache this DateTime.Now() and not go out to the system each and every time?"
No, of course not. You are reaching for straws...
Expert Coming wrote: If not what else coudld be the problem!
The order that you do things in the page, perhaps.
You are looping through the result you get from the query and keeping the last value... Do you have more than one record per user?
Have you stepped through the code or displayed the values that you get so that you see what's really happening?
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I cannot really step through the code as I do not have remote debugger setup. But like I said before, it works fine if you stay active on the page, if you wait like 2 or 3 minutes the pages has what I can only describe as a cache effect and only updates a few seconds worth, then if I get active again after that, it works correctly.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Exception Details: System.UnauthorizedAccessException: Access to the path 'd:\hosting\u4arabeya\jobs\addcv11\CVs\Answers to Non-Muslims.pdf' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user
and when i add the impersonate with the user name and password it aslo desn'et work
any help please
|
|
|
|
|
The user account that your website is running under doesn't have the rights to access this location. If you are uploading to this directory, right-click the directory in Windows Explorer, select 'Security' and grant the user account Write access.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Dear Friends,
Actually this is my first project in which i create an ASP.net web site i want some global data which i stored in Resource.resx file and i create solution for some business logic now each time i have to pass the Resource.resx file data to solution at any page or button event can it is possible to access the resource file of that web site from the soution itself so it could be centralise at solution level.
[Solution (Bussiness Logic)] - [Resource File (Centralise Info)] - [Web page (Front End)]
is this a good idea or i thinking something which is not possible.
i am using Microsoft Visual Studio 2005 (Framework 2.0)
Thanks in advance
Sasmi
|
|
|
|
|
i dont know how did you store the global data in resx file. As per my knowledge resx file is automatically created for an aspx and it only holds the data of the page. I dont know how to call resx file in the code but i have a suggestion...Dont make the code too complicated..if you want the global data to be stored then create a separate class...while deploying use x copy deployment where you only use dll...hope this will help you...
bzinez
|
|
|
|
|
It's always a good practice to keep the string values which is common to the application in a assembly resource file.
In Framework 2.0, accessing the named strings from assembly resource file has been made very simpler. You have to add the resource file to the App_GlobalResources folder and add the named strings to the resource file.
Say for an example, you have added a resource file with the name GlobalData.resx and a string ApplicationName with the value "Sample Application". The named strings you add to a global resource file are accessible through a namespace named Resources . It takes a single line of code...
lblAppName.Text = Resources.GlobalData.ApplicationName
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
how i can make a list box to show the data in the columns manner
like this
col1 col2 col3
1 2 4
and user can select 1 or 2 or 3
|
|
|
|