|
Happy new year Sashidhar !! .
Do more CPing !!!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I am using multiline text box.i set size of it 200.
i set property MaxLength="200".
and i am also using RangeValidator of set the fixed no of char.
But it will not working ,it will accept more then 200 char.
plz anyone help me.i will very thankful for him.
|
|
|
|
|
please post your code . It'll be easy to answer then
Cheers!!
Brij
|
|
|
|
|
MaxLength property does not work for when you set Textmode="multiline" . So, you can use ValidatorControl to Validate the range. I am not sure why this is not working for you. You can Try like this.
<asp:RegularExpressionValidator ID="RegularExpressionValidatorForMultiline" runat="server" ControlToValidate="txtMultiLineText"
Display="Dynamic" ErrorMessage="Please limit to 200 characters or less."
ValidationExpression="[\s\S]{1,2500}"></asp:RegularExpressionValidator>
Another alternative solution is to developed one custom control. I found one great article in Codeproject It self.
Extending the ASP.Net Multiline TextBox control to limit the number of characters entered[^]
And For your more Information Read this Post
MaxLength ignored in multiline textbox.[^]
Hope this will resolve your problem.
Let me know if you need more help.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
You can use JS to control it.
In page:
<script type="text/javascript">
function validatorTextLength(obj)
{
if(obj.value.length==200)
{
event.keyCode = 0;
return ;
}
}
</script>
And in CodeFile, you need to set
TextBox1.Attributes.Add("onkeypress","validatorTextLength(this)");
when pageload.
Good luck.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:46pm.
|
|
|
|
|
hi sir,
please help me i am fresher in asp.net.
actually when i login with login id admin through pc1 and another user login with same login id through pc2 then pc1 session variable effects pc2 session variable.i mean Session variable is not working properly.why
|
|
|
|
|
hi
you can verify a session by SessionID
those sessions differs on SessionID
Hope to be useful
Mohammad Khansari
|
|
|
|
|
vikas shukla wrote: actually when i login with login id admin through pc1 and another user login with same login id through pc2 then pc1 session variable effects pc2 session variable.i mean Session variable is not working properly
This means, there are some problem is your code. What do you mean by "Pc1 Session Variable Effects Pc2 Session variable".
If you can give proper description of your error I can help you out.
By the way, you can first go through this article, It may help you
Exploring Session in ASP.Net[^]
Let me know if you need any more help !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
If we same username from different systems it doesn't effect session from used for same user in another system, ASP.net uses seperate session for each request from different systems or different browsers. If you dont want two users to use same username you can make use of database to check if the user is already logged in or not, Or you can use array of users in global.asax file where the data is global for all usersm, so that you control the user while loggin in (Checking with the global array)...
|
|
|
|
|
Dear frd's
Is it possible to read data from serial port of client system using asp.net web site. Here is my scenario
I will be having computers connected in LAN and a web application which resides on server. Each client computer will be connected to a external machine using serial port and is ready for reading data, external machine measures equipment details and sends through serial port.
Now I need to read the same data using my web page, is it possible?
Like when we do video chatting our web page reads data from web cam and sends the stream to web page. this way how can I read data from client machine to web page.
Please give me suggestions on how to proceed for this.
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
Hello,
I would show a progress bar when i click on the login button, for this i create a picture and i set the propriety Visible on false, in the button code i set visible propriety on true, unfortunatly when i click on the login button the picture don't be appeared, please help met to show this picture, Thank you verry mutch.
|
|
|
|
|
|
Hello,
Thank you for your answer but i would show a picture (progress bar) whene i click on the login button and when i verify if login and password was good i set the picture on hidden. Please help me, thank you verry mutch.
|
|
|
|
|
I think that your login button works by Ajax
If I think true
if your login button is a asp.net control you can use OnClientClick property and set it by a
javascript function name
<asp:Button OnClientClick="return loginFun()"/>
I emitted other irrelevant properties in the pervious code
if your login button is a HTML control you can use onclick property
<input type="button id="loginBtn" onclick="return loginFun()"/>
and in loginFun you show the progress bar
function loginFun()
{
[Your codes]
document.getElementById("progressBar").style.display="inline";
}
and when your ajax response is recieved you can use this javascript code to hide that
document.getElementById("progressBar").style.display="none";
hope to be useful
Mohammad Khansari
|
|
|
|
|
thank you for anwser, but i don't have e progress bar, i have a gif picture, can you helm me to show a gif picture when i click on logon button ? Thank you
|
|
|
|
|
first I want you to answer my question
Q - how does your login button works?
when you click on the button what happens.
the form would be submitted
Or
a XmlHttpRequest (Ajax)would be sent to server for login action
(I answered this situation later)
--------------
about first situation
if form submit is occurred you can not use a progress bar(show an image) to show progress
because whole of your page would be refreshed.
I think that you must study more about HTML and Http to understand what happen when the form submitted
Hope to be useful
Mohammad Khansari
|
|
|
|
|
Hello,
i would show a picture (progress bar), for this i try to do :
<br />
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)<br />
{<br />
<br />
Image2.Visible = true;
<br />
<br />
Authentification au = new Authentification();<br />
MessageBox bb = new MessageBox();<br />
if (Login1.UserName.Length == 0)<br />
{<br />
Label1.Visible = true;<br />
Label1.Text = "Le mot de passe et/ou le login que vous avez entré est invalide.";<br />
Image2.Visible = false;
}<br />
else <br />
{<br />
String url = string.Format("Menu.aspx?login={0}&password={1}", "test", "test");<br />
Response.Redirect(url);<br />
}<br />
<br />
<br />
<br />
}<br />
<br />
<br />
Unfortunatly the picture don't be appear.
thank you verry mutch.
|
|
|
|
|
|
use javascript to display/hide your image.When one sets the visible as false that HTML doesn't render at the page.
Cheers!!
Brij
|
|
|
|
|
abbd wrote: unfortunatly when i click on the login button the picture don't be appeared, please help met to show this picture, T
Showing progress bar is nothing to do with just displaying a image. First of all be clear on why you want show progress bar. If the login process taking time and you want to show progress bar you can use AJAX Update panel and AJAX Progress bar.
http://www.asp.net/Ajax/Documentation/Live/overview/UpdateProgressOverview.aspx[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Dear all,
please any one can help me to understand how this website is working www.ratemyarea.com.
i want to make like this website for me, but i can't do it, any help.
|
|
|
|
|
I am not sure about the answering your questions. You want to use google map in your web application or what ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
yes i want but connect with database.
|
|
|
|
|
|
thanks but if i have a database and i save all the marks in it and i want to retreive all marks to my map how can i do it???
|
|
|
|