Google Maps uses this, to initialize the map object, and request map data before the page is drawn in the browser. When the map canvas is available in the DOM, the map object then draws the map in the map canvas.

If you want to execute some javascript when the DOM intializes, usually 2 seconds after the page paints in the browser window,

If you can't get the value, then double check your ID attribute for the control. If you use the controls ID, then perhaps the ID is changing to another value, so you have to hard code the ID using id="_txt_textbox"

you had your id wrapped in <% %>, so do a response.write(<% %>) and double check the value printed.

Thanks for the ans.
My aim is that when this page loaded it should show a gridview.
now the datasource of gridview depend on what i will send from other pages.(i mean that i just send the type of gridview and in the page_Load it will fill it depending on the type i sent).
So i should know the value of GridviewTypeT.Value in Page_Load for when the page load the gridview will also load automatically.

I have created a web application, where i provide to users to login and log out, register, etc.

I have two databases (i only will use one of them at the end, but now i use them both just to test my application. I use One each time i run the app). I am using the Membership provider on both of those databases. I the Web.config file i point the app to use one of the two databases, by using this connection string:

I have two problems i can't seem to figure out what is going on and why they happen. I have searched a lot , but didn't any post with similar problem.

I can successfully register and after login the registered user. The problem appears in this two scenarios:

1st. When i change the database name in the connection string, put the second database, run the application, and after put again the first database in the connection string and run again the application.

2nd. When i close the SQL Server Express 2008 R2 and then start it again.

Having done those scenarios above, if i try after to login with a user that is registered in any of the two databases, i keep getting message that the password or username is not correct(that is, the error message of the ASP.NET Login control).

But if i want to register a new user, i still can. I only cannot log in .

It seems like the application doesn validate the credentials when logging in.

Anyone had a similar problem or has an idea of what might be going here ??
I am really frustrated at this point ! I've searched a lot but nothing !

What you didn't understand mate ? I tried to explain as simple as i could, but let me try to explain it again.

As i told you i have this application. The user can register, login, log out, change password, etc.

I am able to register new users from the registration form(ASP.NET CreateUserWizard). After having registered them, i can also log in successfully if i give the credentials of any of those users i registered.

But If i do one of the two steps below the error appears.

1. If i close the project and the database server(SQL Server Express 2008 R2)and after open it again, i cannot log in anymore with some of the registered users, as i could before closing the project.

2. If i try to:
i)change database(i have two DB, with different names but exactly the same
tables and columns inside)
ii)point my application in the connection string to the second database.
iii)run the application
iv) after put back the first database in the connection string
v) run the application
vi) try to log in with some user that is already registered
vii) Baam !! The user doesn't get authenticated. I get message that the password
and username are not correct, when before changing the database name,i could log in without
any problem.

And here is the strange thing that makes me crazy. After having done one of the two steps above, i still am able to register new users. The only thing i cannot do anymore, is log in with some user that already exists in the database.

I do not thing that it has to do anything with the Trim, because when i registered the users, i used very simple usernames and passwords without any white spaces, just for testing purposes.

That's much clearer than the previous explanation. I understood the first explanation, just sounded to me like the data input was malformed, so there was no match.

Well overall, connecting to a database is pretty straight forward, but does require a series of steps to make sure it works correctly, before writing 10K lines of code.

I just learned how to use Oracle 11.g, and it took me 3 days to figure the whole thing out from start to finish.

I can probably narrow down your problem, and can only condense it into a smaller format. The actual problem can be within a much larger scope of issues, ranging from connecting to actual table permissions.

Now you may think my post here is condescending, but it's designed to teach you how to fix your problem, because your always going to run into this every time you create a new SQL Server, no matter what brand it is.

In the WebDev [F5], security is relaxed, so connecting to a SQL Server on your development computer is easier.

Server=.\SQLExpress ;Database=myDataBase ;Trusted_Connection=True;

But in a production enviroment, if your SQL server is remote, and your not running in a windows domain, you should use SQL Authentication, which is a SQL user account just for that tablespace, and secure password. When you ran the setup for SQL Server, you had a choice for Windows Auth or Mixed Mode, you need Mixed Mode for web apps, well it's just easier to start with, and is pretty secure with strong passwords.

Next, check your tablespace permissions, your SQL user must be able to CONNECT, SELECT, UPDATE at the minimum. A tablespace is the database name in SQL Server.

Use a program like EMS SQL Manager Lite,to open your table, and use the SQL Tool to write a simple query, and execute it. The program will print the actual server response, which is the error message that caused the failure. In asp.net, you have to capture that error using catch.

SELECT COUNT(*) FROM schema.tablename WHERE accountName = 'testName'

Check your results, you should get a value of 1

If that all works, write a function that does the same thing, and walk through it to make sure you get the same value in your project.

Now if that works fine, the error is now isolated down to your login program. You'll need to walk through the program code using F5 and make a break point using F9, and step through the database code using F11, examine the username and password buffers all the way through the journey, and make sure that the values are valid right up to the database execute query, and then check for any error messages.

Basically I think your either writing or reading bad data, or your user does not have permission to read the data.

If you bound the wizard control to a table, There might be a mistake somewhere, so you have to narrow it down.

[edit]

It doesn't matter that you have 2 databases to anyone but you. You have to fix the first database of choice, and when that is fixed, fix the second one, then both will work correctly.

Well the problem got fixed somehow, but i didn't change anything regarding the database permissions. What i changed was the below properties of my CreateUserWizard control

From

LoginCreatedUser="true" DisableCreatedUser="false"

To

LoginCreatedUser="false" DisableCreatedUser="true"

That seems to fixed the problem, but not completely. I can log in and authenticate all the registered users that exist in my membership database, except the first user i registered. That one can not be authenticated, and i don't understand why, since all the others can be authenticated just fine.

The example code seems to represent that when the create user wizard runs and completes, it will login the user automatically.

So it looks like your problem is that the user is being disabled after creation. So if you login, you get a false flag saying login failed, when login was successful, but the account is disabled, so it's a fail.

You need to edit the table and toggle all the users to non-disabled, I think it should be

When i tried it in local machine through code its working fine, but when i deployed it in IIS and try to import Mpp, it is giving following Error.

Retrieving the COM class factory for component with CLSID {36D27C48-A1E8-11D3-BA55-00C04F72F325} failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)).

GetResponse and requestFTP what are these and how can we upload using GetResponse and requestFTP
bcoz it showing that

Network Error (tcp_error)
A communication error occurred: ""
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

requestFTP is a variable in the code you just posted.GetResponse is a method on the FtpWebRequest type.
The error you keep posting to different threads is most likely related to a timeout or firewall issue, and is nothing to do with the question you asked in the first post of this thread.

"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

I have created a basic wcf service nothing more complicated than helloworld. I have tested it with both WCF Test Client and my own client app and it works fine.

So with that I wanted to add a method to it to see if I might try something a bit more complicated. However now when I try to debug using the WCF Test Client my new method doesnt show up the only method that is there is the original one. So I tried removing the original method completely and test again and it is still there and my new method is still missing.

So it is apparent that my modified service isn't updating whatever the WCF Test Client is using to test against.

Where are the temporary files that VS 2008 generates to allow the WCF Test Client to work. Or could someone explain to me how to refresh the service when I modify it.

Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
i am getting this error after uploaded my application on server. The same application works fine on local.i have used vs 2010,asp.net for the same

you need to update the .Net framework on the server. see on the properties of your project whatever version you are using. as you was able to deploy the app, i suppose your project uses at least the same version of .net that the 'AjaxControlToolkit' uses, that's probably 4.0.

I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

Secondly these limits are there for a reason: allowing uploads of large files isn't normally a good idea, especially on a public website. You need to have think about whether this is really necessary: its slow for the user, has the potential to fill your disk-space quickly and can be used as part of a DoS attack. You should sanity check what is happening, for example can the file be put onto the server by other means than the web-interface.

Thirdly (assuming you still have the need) you might want to consider a richer upload control. There is one here[^] reference as part of a discussion on large file uploads elsewhere. I haven't used it, and so can't vouch for it, but I've found others helpful in the past.

Network Error (tcp_error)
A communication error occurred: ""
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

I'm experimenting with the httpModule, using XP and IIS5.1, asp.net 4.0, in which I want to take a file called display.aspx?pNp=XXXX and turn it into a file name XXXX.aspx.

So I wrote the first part, I know what context.Items("originalUrl") is for, but I'm not sure if I actually need it, because I don't don't have the second part written or working yet. It's been awhile since my last 3 failures at attempting this.

I'd like to get another set of eyes on my code, before I procede, in case I really blew it here. And see if there are any mistakes.

It seems to work, and I get the error message below, so I figure it's ok.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /EN-US/part-lookup/catagory/XXXX.aspx

Normally, you'd generate a set of service proxy classes to handle the communication to the server. Working at the Http level/rolling your own messages is normally tiresome and needless, thankfully there is a wsdl defining the service you want to use.

You can also add a reference to the web service by right-clicking the project --> add service reference and using http://217.52.114.3/kannelsending/service.asmx as the service address. Don't know how well it works with external IPs, and if anything changes with the external service, it could break your code.

Depending on how big your images are, and which browsers you need to support, you might be able to use a data URI[^]. (If you're using IE8, you're limited to 32Kb; earlier versions of IE aren't supported at all.)

If you need to support older versions of IE, you'll need to pass a query-string to your handler. If the image is more than 32Kb, it'll be too large for a query-string, so you'll need to pass some kind of ID to allow the handler to retrieve the image.

"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

I get the following error while trying to access an msacccess database ,i cant seem to figure it out,the error is

IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Line 20: SQLString = "SELECT DISTINCT Position FROM applicant ORDER BY position"
Line 21: DBCommand = New OleDbCommand(SQLString, DBConnection)
Line 22: DBReader = DBCommand.ExecuteReader()
Line 23:
Line 24: While DBReader.Read()

I have web application in vs2008(.net framework 3.5) which uses crystal reports

I have to convert it in to vs2010

I just opened the application to vs2010 solution and visual studio itself migrated the application everything runs fine except crystal reports.
Reports are opening but images are not visible like for printer or next or back button red "x" is visible

i installed sap crystal reports for vs2010 and tried to refer new dll's but code is still referring old dll's of crystal report.
Steps followed
right clicked and removed old reference dll
again right clicked-> add referece and added new crystal reports dll
but it is still refering old ver10 dll's instead of ver13
Do we also need to do something else.Please advise.