|
yes... you are right,
textarea doesnt take MaxLength ...
use this
<script language="javascript" type="text/javascript">
function isValid(elem, maxlen)
{
return (elem.value.length <= maxlen);
}
</script>
<textarea name="txt" onkeypress="return isValid(this, 800);" ><textarea>
Also place rows and columns you want to the textarea.
|
|
|
|
|
if(textArea.length > 800)
{
alert("length exceed..");
}
|
|
|
|
|
textArea doesnt have length property. Its textArea.value.length
Also if you reply to my reply, the original user will not get the notification. So when you want to give answers always reply to the user who have the question.
|
|
|
|
|
hi,
i have an asp.net page where is a flash media player (ASPNetFlashVideo) now i want user can only watch the video and can not downloading this video specially in Maxthon explorer .Thanks
|
|
|
|
|
AFAIK, you have no chance to prevent this straight away.
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.
|
|
|
|
|
I've done this. What I did was, write a http handler that handled downloading of movies, and I modified an flv player so that only that player could play them. That way, the URL to the files was hidden, and only the player could decode them. However, even then, if you want your movies to be playable at all, you probably can't stop someone who is really determined from finding them. All you can hope to do, is a test that will satisfy a manager that they are not exposed.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Actually the flv player is downloaded totally to the client, and the video is buffered to it. There are few browser plugins that can capture the bufferred stream and write to a file. I think there is no way to stop this from the server side, and buffering is done in the client.
What you can do to secure, is to design the player a better way.
|
|
|
|
|
|
Maybe this[^] will help
only two letters away from being an asset
|
|
|
|
|
thnak you but am working with asp.net
al hajjaj
|
|
|
|
|
You should buy a basic ASP.NET book and work through it, because you seem very confused.
You write a template for the link in the gridview that includes the url, exactly as you're showing it, except it needs a value - deteles.aspx?Id_no=3 for example. Then you use Request.QueryString to read the value on the other page.
This is 101 stuff. I assume this is not a commercial project, but one for learning. Apart from anything else ( such as your lack of experience ), your client won't be happy to get a page with a link that says 'show deteles'......
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
U Can Used This
Response.Redirect(string.Format("default.aspx?Page=Resern&navigation=view&ReservationID={0}&SegmentID={1}&stat
us={2}", reserID, segID,status), true);
if it is Integer format u need to use {o}
reserID,segID,status is integer
if it helps Mark It As Answer
|
|
|
|
|
Response.Redirect(string.Format("default.aspx?Page=Resern&navigation=view&ReservationID={0}&SegmentID={1}&status={2}", reserID, segID,status), true);
what is this what are this thing "reserID, segID,status"???
i only want to Pass The ID_no from the data gridview in the first page "Defult.aspx"
((this will happen when i Click on the Hyperlink "Show detels" in the gride view ))
after clicking on the linke it shuold pass the id to the secound page "Deteles.aspx" that is all what i want.
my god those guys are genus and i can't do this thing !!!!
thank you sir.
al hajjaj
|
|
|
|
|
write this code in response page
"Response.Redirect(string.Format(default.aspx?id={0}",id), true);
Write this code in secound page
string id=Request.QueryString["id"];
u will get the id in string format
otherwise store it in session
If It Helps Click It as Answer
|
|
|
|
|
Getting Parser error when running Web Application on Internet
----
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Home_2'.
Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" Inherits="Home_2" Codebehind="Home_2.master.cs" %>
----
But it is running on local host
|
|
|
|
|
Did you also copied the App_Code and bin directory? It seems that the Home_2-class is missing.
|
|
|
|
|
Hi
I am try to remove session variable value on a button click how i remoove it. as i prviusly try these
Session.RemoveAll();
Session.Remove();
Session.Clear();
Session.Abandon();
but when we go to back button and travel privious pages session varable value shows always on label control.
|
|
|
|
|
|
gauravems wrote: Session.expire();
What it will do ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
it's giving error
System.Web.SessionState.HttpSessionState' does not contain a definition for 'expire'
|
|
|
|
|
Hello,
In many website / CMS i have seen, on the bottom of the page it displayed as
"Generated in 0.0340161323547 seconds."
How to do that in ASP.NET?
|
|
|
|
|
Just define a HttpModule,
public class TimingModule : IHttpModule {
public void Init(HttpApplication context) {
context.BeginRequest += OnBeginRequest;
context.EndRequest += OnEndRequest;
}
void OnBeginRequest(object sender, System.EventArgs e) {
if (HttpContext.Current.Request.IsLocal) {
var stopwatch = new Stopwatch();
HttpContext.Current.Items["Stopwatch"] = stopwatch;
stopwatch.Start();
}
}
void OnEndRequest(object sender, System.EventArgs e) {
if (HttpContext.Current.Request.IsLocal) {
Stopwatch stopwatch =
(Stopwatch)HttpContext.Current.Items["Stopwatch"];
stopwatch.Stop();
TimeSpan ts = stopwatch.Elapsed;
string elapsedTime = String.Format("Generated in {0}ms", ts.TotalMilliseconds);
HttpContext.Current.Response.Write("<p>" + elapsedTime + "</p>");
}
}
}
Then add:
<httpModules>>
<add name="TimingModule" type="TimingModule" />
</httpModules>
Each page will have "Generated in (0)ms" at the bottom.
|
|
|
|
|
Hi,
I am developing a database(in SQL SERVER 2005) for a website, as you know that there can be a unknown amount of users surfing a website.
I am putting some registration related values in a table and my table is having a unique primary key with IDENTITY(1,1).
now the problem is I need that primary key value as soon as it is created in the table.
so that I may use that value to add( insert) some other values in other tables.
can it be done?
I have thought of using timestamp values as they are always unique to every row.
I have read somewhere that whenever a query is executed a value is returned such as 1 row affected or something like that,
is it possible to return the timestamp value in place of the above message, I really have no idea.
If it can then may be I can use some query like SELECT id FROM table WHERE timestamp=....;
please reply
YOUR help shall be appreciated
thank YOU
shankbond
|
|
|
|
|
And what does it has to do with ASP.Net?
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.
|
|
|
|