|
|
hi first i say sorry to u....
i need the logic for consuming other website rss...
|
|
|
|
|
how i can make a lable visible =false when i press any key in the textbox
is there is any java script is there to check
|
|
|
|
|
Yes, you can handle the keypress, search for the label by it's Id and hide it in javascript.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sir,wat is the word for hidding a label..since iam using document.getelementbyid("label name").visible =false it is not working..wll u plz tell the code once
|
|
|
|
|
You can use
document.getElementById("label name").style.display='none';
to hide your label through javascript.
Apurva Kaushal
|
|
|
|
|
Hi,
Do u want something like this?
When u type something in ur Textbox at that time that label shold be Invisible???
This can be done with J.Script 'onkeypress' Event of textbox.
Put THis all in ur Page HTML
<html><br />
<head><br />
<script language="javascript" type="text/javascript"><br />
function Hello()<br />
{ <br />
document.getElementById('Label1').innerHTML = '';<br />
} <br />
</script><br />
</head><br />
<body><br />
<form id="Form1" runat="server"><br />
<asp:label id="Label1" runat="server" visible="True">My Label</asp:label> <br />
<input id="MyTextBox" onkeypress="javascript:return Hello();" type="text" runat="server"><br />
</input></form><br />
</body><br />
</html>
Believe Yourself™ :->™
|
|
|
|
|
hi,
Why 'innerHTML'?
I think its not for this purpose!
|
|
|
|
|
Actually innerHTML will give you the text inside that label and emptying that text will make the text invisible and in turn label will not be visible but that is not the correct way to achieve it it can be done with style.display='none' as I have mentioned in my above reply.
Apurva Kaushal
|
|
|
|
|
$ wrote: Why 'innerHTML'?
I think its not for this purpose!
It is needed. ASP label control will be rendered as HTML span. So to get text of a span, InnerHTML is needed.
|
|
|
|
|
hi all
i have an application in which the first page is login form which contains username and password as usual.also a check box named remember my password(like in windows application).i want to remember the password if that checkbox is checked n deleted if it is not checked.(like in windows application.)can anyone assist me in doing this through code in c#.waiting anxiously for the reply.
Thanks in advance.
pintoo
|
|
|
|
|
You can use cookie in order to achieve that functionality. You can have a look at this[^] to know about cookies in asp.net.
Apurva Kaushal
|
|
|
|
|
hi
thanx for the assistance.by the way i tried with cookies in my application.but it is not working properly when there are many users.it is remembering the same password for all the users and giving error.iam providing the code with this for your reference.can you tell me how this code can be modified so that i can achieve the condition
<br />
protected void btnlogin_Click(object sender, EventArgs e)<br />
{<br />
if (chkRemindPassword.Checked)<br />
{<br />
Response.Cookies["Password123"].Value = txtPassword.Text;<br />
Response.Cookies["Password123"].Expires = DateTime.Now.AddYears(50);<br />
}<br />
<br />
if (Request.Cookies["Password123"] != null)<br />
{<br />
txtPassword.Text = Server.HtmlEncode(Request.Cookies["Password123"].Value);<br />
Label1.Text = Server.HtmlEncode(Request.Cookies["ok"].Value);<br />
}<br />
try<br />
{<br />
if (txtUserName.Text.Trim() == "" && txtPassword.Text.Trim() == "")<br />
{<br />
lblinvalidentry.Text = "User Name & Password should not be Empty";<br />
}<br />
else if (txtUserName.Text.Trim() == "")<br />
{<br />
lblinvalidentry.Text = "User Name Should Not Be Empty";<br />
}<br />
else if (txtPassword.Text.Trim() == "")<br />
{<br />
lblinvalidentry.Text = "Password Should Not Be Empty";<br />
}<br />
else<br />
{<br />
int i = 0;<br />
SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["ConStr"]);<br />
string str = "select *from UserDetails";<br />
SqlCommand cmd = new SqlCommand(str, con);<br />
if (con.State == ConnectionState.Closed)<br />
{<br />
con.Open();<br />
}<br />
SqlDataReader rdr = cmd.ExecuteReader();<br />
while (rdr.Read())<br />
{<br />
if (rdr["UserName"].ToString() == txtUserName.Text.Trim().ToLower() && rdr["Password"].ToString() == txtPassword.Text.Trim().ToLower())<br />
{<br />
i = 1;<br />
}<br />
}<br />
if (i == 1)<br />
{<br />
Response.Redirect("sms_home.aspx");<br />
}<br />
else<br />
{<br />
lblinvalidentry.Text = "Invalid User Name and Password";<br />
}<br />
}<br />
<br />
}<br />
catch (Exception exx)<br />
{<br />
exx.Data.Clear();<br />
}<br />
}<br />
<br />
pintoo
|
|
|
|
|
Simple way is to just use cookies.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
How can we insert an image in a textbox...
I mean i like to put the image in search textbox....
we can find this in some sites like apple...
|
|
|
|
|
Give us a link. You cannot put an image inside a textbox.
OK, I see. you have images on either side of a textbox that make it look that way. It's just a textbox with pictures next to it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How about if i write the following code...?
<html><head>
<style type="text/css">
.textboxstyle{
background-image:url('http://library.mit.edu/exlibris/aleph/u16_1/alephe/www_f_eng/icon/v-icon-3.gif');
background-repeat: no-repeat;
background-position: center left;
padding-left: 18px;
}
</style>
</head>
<body>
<input type="text" name="uname" class="textboxstyle">
</input></body>
</html>
|
|
|
|
|
If that works, then that is news to me.
Well, live and learn. Apparently, you can do this. Which means that a web browser rolls it's own text control, it doesn't use the windows one.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
Please try this.
<br />
<html><head><br />
<style type="text/css"><br />
<br />
.textboxstyle{<br />
background-image:url('http://library.mit.edu/exlibris/aleph/u16_1/alephe/www_f_eng/icon/v-icon-3.gif');<br />
background-repeat: no-repeat;<br />
background-position: center left;<br />
padding-left: 18px;<br />
}<br />
<br />
</style><br />
</head><br />
<body><br />
<input type="text" name="uname" class="textboxstyle"><br />
</input></body><br />
</html>
Keep Smiling
|
|
|
|
|
Wow...!
Thnkyou so much Shah
Its working out...
|
|
|
|
|
Hi
U can try this in ur CSS Class
background-image: url(Image/Image1.jpg);
If any problem in this then give reply.....
If this Reply Help u , THen don't forget to give ratings...Just Do IT™ [Information Technology]™ :->
|
|
|
|
|
Can any body reply us What is Collate in SQL?
Thanks...in advance
Regards
Nanda Kumar
Abhishek
|
|
|
|
|
|
hi,
i wanna highlight (ie. in selection) a search text in textbox..in vb i know about selstart and sellength. but i need this logic in asp.net 2.0. anybody know pls help me..
|
|
|
|
|
You can have a look at this[^] article to get to know about how to highlight the selected text.
Apurva Kaushal
|
|
|
|