|
<asp:textbox id="txtPemail" runat="server" cssclass="input" maxlength="100" xmlns:asp="#unknown">
<asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" controltovalidate="txtPemail" xmlns:asp="#unknown">
ErrorMessage="*" ValidationGroup="g2" SetFocusOnError="True">
<asp:regularexpressionvalidator id="RegularExpressionValidator1" runat="server" controltovalidate="txtPemail" xmlns:asp="#unknown">
ErrorMessage="Invalid email-id" Font-Italic="False" Font-Size="Smaller" SetFocusOnError="True"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="g2"
Width="70px">
krishna veer singh
|
|
|
|
|
|
Hi Gaurav,
This is called CAPTCHA stands for "completely automated public Turing test to tell computers and humans apart."
many sites use it at the time of Sign in.
if you want to implement it
Basic Image Generation For Verification[^]
For Advance
CAPTCHA Image[^]
Hope this will help you.
Good luck!!!
cheers,
Abhijit
|
|
|
|
|
hi. iam create this controls and add my webform. its work.
but when Page IsPostBack then its run again.. read resource file...
i want just one time read resource file...
can you help me?
'control class
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Public Class MyButton
Inherits WebControls.Button
Private _translateLanguage As Boolean = True
Public Property TranstaleLanguage() As Boolean
Get
Return _translateLanguage
End Get
Set(ByVal value As Boolean)
_translateLanguage = value
End Set
End Property
Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)
If TranstaleLanguage = True Then
Me.Text = Language.ResourceFile.GetString(Me.ID & "_Text")
End If
End Sub
End Class
modified on Monday, August 11, 2008 2:07 AM
|
|
|
|
|
if (Page.IsPostBack == false)
{
//your code
}
else
{
dont do anything
}
|
|
|
|
|
hi, i am create new button control and add my web form.
this control is run page preinit.
|
|
|
|
|
Hi, Im making a website with ASP.NET and C#. And in web.config I have disabled both viewstate and viewstatemac. But I still get the viewstatemac error when on a slooooow connection.
Thanks!
|
|
|
|
|
It would be important to highlight certain keywords in a message board for example or while searching for a keyword in ASP Search Engine, We are then in need of a function that would highlight certain keywords within the text of the messages.
|
|
|
|
|
You can try this way.
string myText="Hi,I am from Ahmedabad";
string searchText="Hi";
string result=myText.Replace(searchText,"<font style="color:red;font-weight:bold;">"+searchText+"</font>");
please don't forget to vote on the post that helped you.
|
|
|
|
|
Are you using any tool/engine for searching text in the message ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hi, I can't get the original HTML source in
((HTMLDocument)webBrowser1.Document).documentElement.innerHTML
as the HTML code in viewsource. The code comes without quotes and all of the tag names comes as upper case. Is there any way to get original source in axWebBrowser as in System.Windows.Froms.WebBrowser.DocumentText ?
baris
|
|
|
|
|
Hi,
i have this requirement. i have 50 records in my database. i want to show one record on page load. whenever i hit a button submit, it needs to show another record.
my doubt is how can i get the record value whenever button press, because, when i pressed submit button, the same code executes and again it gets the 1st record itself. but i want the next record by hitting the button. how can i persist the record no?
Another criteria:
if i press button, it navigates to another page and show some data and again get back to previous page by hiting some button on second page.
then how can i show the next record in first page?
G. Satish
|
|
|
|
|
Hi,
First get all 50 records at the page load and bind it to a GridView control at IsPostBack false condition, assigining PageSize property to 1 and AllowPaging property to true. And also set your primary key as the DataKeys in the GridView control.
For the PageIndexChanging event, store the selected page in a Sesssion variable and navigate to any page you want. And when returning back, before binding the GridView again assign the Session's PageIndex value to the GridView's PageIndex property. So that you will get the next page you want..By this way traversing to any page plus navigating to Previous Next options also will be posible.
Hope this helps.
Thx,
Gayani
|
|
|
|
|
any one over here help me please .
I using a .js file for client side validations. Ihave written the validation function in th .js file and when I click the button it has to validate the control(TextBox).But it is not working . I am able to go into the .js file but the code (if condition) is not executed. I give my code as below (C#)
Validations.js
function validate()
{
window.alert(".js File"); // I am able to get this alert but if
// condition is not checked when textbox is null
if(document.getElementById ("<%=txtName.ClientID %>").value=="")
{
window.alert("Name Feild can not be blank");
document.getElementById("<%=txtName.ClientID%>").focus();
return false;
}
}
Validate.aspx
<asp:button id="Button1" runat="server" height="50px" onclientclick="return validate()" text="Button" width="148px" xmlns:asp="#unknown">
<asp:textbox id="txtName" runat="server" xmlns:asp="#unknown">;
when i click on the button without entering a value into the textbox i am not getting the alert message "Name Feild can not be blank". please help me.
Kovuru Sreedhar
|
|
|
|
|
kvsreedhar wrote: f(document.getElementById ("<%=txtName.ClientID %>").value=="")
Why dont you try like this?
if(document.getElementById ('txtName').value=='')
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thanks Imran it's working.
But a small doubt , when I used the same code as an InLine code (in .aspx script tag and did not use .js file), it worked . what's the concept behind.
please clear my doubt
Thanks in advance
Kovuru Sreedhar
|
|
|
|
|
kvsreedhar wrote: But a small doubt , when I used the same code as an InLine code (in .aspx script tag and did not use .js file), it worked . what's the concept behind.
Problem was that you have put txtName.ClientID in double quote so that It was worked as string.
please don't forget to vote on the post that helped you.
modified on Monday, August 4, 2008 3:04 AM
|
|
|
|
|
I have tried but not working
( .js code)
if(document.getElementById('+<%txtName.ClientID%>+').value=='')
{
window.alert("Name Feild can not be blank");
return false;
}
Kovuru Sreedhar
|
|
|
|
|
kvsreedhar wrote: I have tried but not working
Yeah.It didn't work. Sorry,I modified my previous post
please don't forget to vote on the post that helped you.
|
|
|
|
|
in place of
document.getElementById("<%=txtName.ClientID%>").focus();
u write
document.getElementById('<%=txtName.ClientID%>').focus();
this will work perfectly.
|
|
|
|
|
thank you for your help and time.
Kovuru Sreedhar
|
|
|
|
|
Hi
i need to import email addresses fm my address book to a website.in the webpage there shud be textboxes for username and password n when we enter the both its needed to display all the mail addresses and names in a label
plz sent the code written ic c# using asp.net....
snt it to rekha8686@gmail.com
Thanx in advance....
Rekha P.Shenoy
|
|
|
|
|
rekhapshenoy86 wrote: i need to import email addresses fm my address book
where is your address book ? Do you want to retreive from Database ?
rekhapshenoy86 wrote: plz sent the code written ic c# using asp.net....
no one will send you code. if you have any doubt you can ask here !!!
cheers,
Abhijit
|
|
|
|
|
Hi friends, Good morning.
I have a bit problem here.My client requirement is that he wants to place two different sites on one server.
Second site should be in one folder with bin folder and web config file also.
I know I have to make that folder as virtual directory but if I move bin folder in that folder then does site work or not?
What I have to do for this?
please don't forget to vote on the post that helped you.
|
|
|
|
|
If you have an IIS or any other webserver running, then you can place as many sites as you want to..
Try placing this second site as well (create a virtual directory also) and it will work like a Charm..
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|