|
Yes... RegisterStartupScript places the script after all the objects are rendered while RegisterClientScriptBlock places the JS at the beginning.
Thus say you are calling a javascript using RegisterClientScriptBlock which gets an element, you will find this null, as the script gets executed just before any html is rendered. In case of RegisterStartupScript the script is placed after the html is generated. So If you want to place a javascript call in your html, always use RegisterStartupScript .
Hope you got it. If not I can give you examples.
|
|
|
|
|
Thanks for your excellent explanation..
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
you are most welcome ... budd
|
|
|
|
|
I download a template in online and design my site and i finish my site. When i run IE it does not work button clicks and textbox input values and dropdownlist selected values and every values will be lost postback but it will work properly in firefox what is this error...give any solution to this problem...
Thanks in advance...
|
|
|
|
|
Can U Give u the link to ur Website So Tht We can See Whts going on
Check the source of the ie explorer of ur website
If It Helps Click It as Answer
|
|
|
|
|
http://matrimony.justclicksearch.in
|
|
|
|
|
smraj1503 wrote: http://matrimony.justclicksearch.in
I am using Ie8 and checked its Working Fine
I dont Know theexact Solution Try to clear all privacy data in ie and check it
If It Helps Click It as Answer
|
|
|
|
|
Iam using IE6.0 and clear private data, it does not work...
|
|
|
|
|
Without seeing your code its very difficult to tell
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
|
Can you atleast wrap the code. It is not readable.
Secondly, do you think anybody is gonna read all code of yours. Please narrow it down.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Please don't delete messages. This is Rude.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
are you using asp.net server control?
Share your code to help you.
|
|
|
|
|
I have asked for the code, but i dont know why he deleted his message
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Yes.. this is the most weird thing with some guys...
|
|
|
|
|
Dear All,
I have read a lot of articels and infos about the authentication but i found no hint where my problem was descripted.
My problem is, I have a intranet application and my authentication is "Windows".
It works perfect but how can I handle if on a windows client another user as the windows user was logged into my web application?
That mean i need a logout for the actual webapplication and a relogin with another user (DomainUser).
Is this possible?
Did I need a mix from Windows - authentication and Form authentication?
Thanks for your Help
chroalja
|
|
|
|
|
gitschi wrote: My problem is, I have a intranet application and my authentication is "Windows".
It works perfect but how can I handle if on a windows client another user as the windows user was logged into my web application?
Windows Authentication means, Authenticating the User from Active Diretory.
If you set authentication mode as windows, A popup will ask for user name and password for the user. Which should be the DomainName\UserName and Password .
User who is not under that domain in which your application is hostes will not able to access the site.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Abhijit Jana wrote:
Windows Authentication means, Authenticating the User from Active Diretory.
If you set authentication mode as windows, A popup will ask for user name and password for the user. Which should be the DomainName\UserName and Password.
User who is not under that domain in which your application is hostes will not able to access the site.
Hello,
if i connect from a client which was not inside my domain a popup in the IE ask for user and passwort. That's right because i have customized my IIS to "Windows Integrated security".
If the client was in my Active Directory no popup occur. That's also ok.
But, and that is my main question how can i handle if the client is already connected with a windows user which is in the active directory for example "GASTUSER" and now another user will login with his own user "USERXXX" and his one security settings but without relogin on the client pc. Only Logout for the intranet application and Login with user "USERXX".
I tried this with Form Authentification and a connection to my LDAP but it's not really fast and we have a lot of directory with different users.
Maybe the solution is very easy but i have no idea.
Bye
chroalja
|
|
|
|
|
gitschi wrote: Did I need a mix from Windows - authentication and Form authentication?
You can mix them. Use the standard ASP.NET login controls and handle the authentication request on your own. You can use AD to authenticate or some other credential system.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: You can mix them. Use the standard ASP.NET login controls and handle the authentication request on your own. You can use AD to authenticate or some other credential system.
Hello Mark,
if i understood correct.
1. The IIS is configured with "Integration Windows authentication"
2. I have created a standard ASP.NET login control.
In the web.config the setting authentication = "Forms" and i have a Login and a Default URL defined.
I added a new Provider: System.Web.Security.ActiveDirectoryMembershipProvider with the connection string to my Active Directory.
In the default.aspx i check if the User.Identity.IsAuthenticated if yes a lot of settings was set.
So now have the user the possibility to logout. If the user click to logout i to the following
"FormsAuthentication.SignOut() and Response.Redirect("tomylogin.aspx")"
In the "tomylogin.aspx" the stanard ASP.NET login control exists. If the user inserting User and Passwort and click on logon the figures was checked because of the settings in the web.config (Active Directory String....). Is the user authenticatet a redirect to my default.aspx was execute.
My problem now is
1. the first check with the Active Directory is very very slow (i think we have to much users and structurs in the ADS).
2. Is this the correct way for a logout and login to my intranetpage?
3. Can i handle this easier?
Thanks for your help.
best regards
gitschi
|
|
|
|
|
|
Mark Nischalke wrote: Try looking here; How To: Use Forms Authentication with Active Director
Hello Mark,
this article helps me.
Thanks for your answer.
best regards
Gitschi
|
|
|
|
|
hiii
i have created textbox dynamically.
i want to submit the values of this dynamic textbox on button click.
i have written the code but as soon as i click on button the control get lost and no value get submitted in database.When i called createcontrol function on ispostback property at page load it creates
the controls twice.shud i use viewstate for this and how.plz guide.
|
|
|
|
|
mylogics wrote: i have created textbox dynamically.
i want to submit the values of this dynamic textbox on button click.
The control which you are creating dynamically, you need to created before Page_Load() , other wise, it will not able to maintain the View State Data or will not load the Postback Data.
If you deeply look inside ASP.NET Page Life Cycle, Before Page_Load(), there are two different methods calls. 1) LoadViewState() and 2)LoadPostbackData() .
So, if you create any control on Page_Load() , or after that it will not able to load the data.
So you need to create such control either in Pre_Init() or Init() method.
Though there are workaround to add the Control which are created after page_load into Control Tree for maintaining viewstate and Postback, using Catch up . I am not discussing that over here.
Hope this will help you in longer run
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Use Page_Init or OnInit for adding dynamic control otherwise you need to manually maintain the view state.
|
|
|
|