|
Create a composite control , in that use javascript something like this
if (MaxLength > 0 && TextMode == TextBoxMode.MultiLine)
{
// Add javascript handlers for paste and keypress
Attributes.Add("onkeypress", "doKeypress(this);");
Attributes.Add("onbeforepaste", "doBeforePaste(this);");
Attributes.Add("onpaste", "doPaste(this);");
// Add attribute for access of maxlength property on client-side
Attributes.Add("maxLength", this.MaxLength.ToString());
// Register client side include - only once per page
if (!Page.ClientScript.IsClientScriptIncludeRegistered("TextArea"))
{
Page.ClientScript.RegisterClientScriptInclude("TextArea", ResolveClientUrl("~/FSjavaScript/textArea.js"));
}
}
then u can use the control as many times u feel like , the scripts will not roll up
|
|
|
|
|
Hello.
I want to add a Control to my Page through the code-behind, and AFTER that, use the Response.Write cmd.
eg.:
Page.Controls.Add(Page.LoadControl("Top.Ascx"));
Response.Write("after");
Will this load the Control, and after the Control is loaded, it will write "after" or just the oposite?
If it is oposite, how can I fix it?
Thanks alot.
NaNg.
|
|
|
|
|
It will first add the control to the control collection of the page object, then it will write the text to the output stream. As the controls of the page is rendered to the output stream after the Page_Load (and Page_PreRender), the text will end up before the entire page, even before the <htlm> tag.
If you want to put text on the page, put it in a control, either one that you put on the page in advance, or one that you add to the page. A Literal control is suitable to put plain text on a page.
---
b { font-weight: normal; }
|
|
|
|
|
I wanna use the asp.net 2.0 menu control .
i am binding it to an xml file, then it always shows my menu items with one root(caz each xml file must have one root element).
how can i eliminate the root from my menu items?????
|
|
|
|
|
I'm sure this falls into the category of "question that has been answered that can't be found by a search". I have inherited a website written in ASP (not ASP.NET). I now want to integrate new pages into the site but I only program in ASP.NET. Am I going to have problems running an ASP.NET application (with all its associates web.config / global.asax etc etc files) from the same server directory that the ASP application is currently sitting in?
I have seen utilities that automatically convert ASP into ASP.NET but I'm pretty sure that that is likely to go wrong and I don't have the time to correct the errors. Does anyone have experience of doing this conversion? How pain free is it?
Thanks in advance,
Matt
|
|
|
|
|
You can use both ASP.NET and ASP pages in the same site. IIS will handle invoking the proper httpmodules to process the request.
only two letters away from being an asset
|
|
|
|
|
i have site connect to database system
and users register in my site
and i want know the current users inspecific catgory
and total number of users
Eng.developer
|
|
|
|
|
just count the no of users from database
Mahendra
|
|
|
|
|
When the user goes throught the login page, you must to create a two session values with the user_ID and category, later create a consultation page, this page count all the user_id session values actives.
keep Learning...
|
|
|
|
|
hi
I have a html selected control
and i want the selected text from javascript
the control is like this
hi
I want this "hi" from javascript
deepak
|
|
|
|
|
getElementById("s").options(0)
only two letters away from being an asset
|
|
|
|
|
u can get selected value using
alert(document.getElementById("s").value);
Mahendra
|
|
|
|
|
when i logout of site and then press the back button from tool bar menu (Green button) then it login me without entering the login information.so how this problem can be handled that the previous page(the page which display after login page) is not display without entering login information.
|
|
|
|
|
create a session when logging and kill it as soon as u loggout
|
|
|
|
|
If you are using forms authentication make sure you call
FormsAuthentication.SignOut();
otherwise you need to revoke the session, cookie, whatever you use to indicate a user has logged in.
only two letters away from being an asset
|
|
|
|
|
Be sure to kill all session variables when you log out
Create a Message logout page onto the load page write the code Session.RemoveAll()
keep Learning...
|
|
|
|
|
Hi there,
I have a rather large form with a couple of sections (simple graphical groupings, so that the user doesn't get confused) on. Now the user has scrolled down to section 3 and changed a value in a dropdown, which causes an Postback (AutoPostback = true ). I process the Postback and when the page is sent back to the client, I'd like to append a #section3 to the url causing the browser to navigate down the page to the previously active section. can this be done? and how do I replace it with #section14 it if the guy selects another value in the section 8?
hope I sufficiently explained the problem. if you have any questions, please let me know. thanks in advance.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
|
hi there,
thanks for your reply. but this would need the 2.0 version, which I don't have. any ideas on how to do it in 1.1? I'm currently messing around but I believe, there must be a simple, obvious solution for it.
againg, thanks for your reply.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
Matthias,
Does the SmartNavigation work for you ? (the version 1.1 supports it)
|
|
|
|
|
I am using formauthentication but I want to let everyone even guest to be able to view my default page. Right now it is setup to send people right to the login page because the authcookie isn't set. Any suggestions or examples would be great. Thank Mark I finally got FormsAuthenication to work.
|
|
|
|
|
You could place all of your files in a folder under your root. Then either by including a web.config file in that folder with the authentication and authorization elements set correctly, or by including the settings in the main web.config and using the path attribute you can control access to these pages while still allowing anonymous access to other pages.
only two letters away from being an asset
|
|
|
|
|
Hi..
I wrote a code to read from a file(Polls.config).Locally no problem occured but after uploading the project to the web a dialog appeared asking me for the UserName and Password and when I click Cancel Button the following error occur:
Access to the path "C:\Sites\Single25\nabeel1eagle\webroot\AdministratorSite\Polls.config" is denied.
Please..could any one help?
I am too late but i will never give up
|
|
|
|
|
I'm writing a project in ASP.NET 2.0 (C#, if it matters to you). I want to take advantage of the security framework provided by .NET 2.0. However, the client demands that the backend be SQL Server 2000, not 2005.
I ran the setup utility (aspnet_whatever.exe, I can't remember the name now), made entries in the web.config to point to the database, and I successfully set up 5 users and multiple roles. In the development environment, everything works great.
I deployed the project to a staging server (that can also recognize the SQL server I set up the database on), and the login control told me that my login could not be verified. Drilling deeper into the Membership class I found that the framework is not finding any users at all.
I next ran SQL Profiler to make sure the database could be found. It is. So if I have the right user name and password, and the app is communicating with the database, why can I not log in on the deployed app?
I've read on multiple websites many others who have experienced the same problem, but no one seems to have a solution. Please help. Thanks.
|
|
|
|
|
Hi to all,
I'm trying to debug a local web service that use in a local windows app but I'm getting this error:
"There is not source code available for the current location."
What can I do?
(I'm using VS.NET 2005 C#)
Thanks in advance
hlopez on RD
|
|
|
|