|
why text change event ? Its means you are doing post back on every changed of textbox char. Do it on Submit button click. And Place the control inside upodate panel.
Priyagdpl wrote: I used Update Panel, still it get refresh.
Do you have multiple update panel in the page ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
You can use the Generic Handler for this purpose. Just put ur whole logic to identify the duplicate email then call this handler via xmlhttprequest.
var xmlhttp;
function InitXmlHttpRequest() {
xmlhttp = null;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
function CheckDuplicateEmail(url) {
InitXmlHttpRequest();
var handleStateChanged = function() {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
try {
alert("message from server : " + xmlhttp.responseText);
}
catch (e) {
}
}
else {
}
}
};
if (xmlhttp != null) {
xmlhttp.onreadystatechange = handleStateChanged;
xmlhttp.open("GET", url, true);
xmlhttp.send(null);
}
else {
}
}
now you can call this js method (CheckDuplicateEmail) on any event like textchangesd, lostfocus or keyup. Here the url is the Url of the Generic Handler u have created in previous step. The ResponseText will give you the data that u have returned from Generic Handler.
I hope it gonna help u.
|
|
|
|
|
I am adding a handler to dragdropcontrol(ajax control) on mouseup so that i can get new position of control when mouse is up and fire button click event from javascript function. even handler is added on pageLoad (javascript function). event gets fired with IE but not with firefox and google chrome. please help. code is given below:
C# code:
//***dpe is dragdropextender control
string strScript = @"<script type='text/javascript' language='javascript'> function pageLoad(){Sys.UI.DomEvent.addHandler($find('" + dpe.BehaviorID + "').get_element(), 'dragend', onMouseUp);} </script>";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", strScript);
Javascript function is:
function onMouseUp()
{
document.getElementById('<% =btnResetPosition.ClientID %>').click();
}
|
|
|
|
|
Hi All,
Custom conetext menu(Custom controls) of extended gridview is working only in IE, and not working in firefox. Kindly please suggest me the ways to fix it.
modified on Thursday, September 24, 2009 2:29 AM
|
|
|
|
|
saritha_codeproject wrote: Custom conetext menu(Custom controls) of extended gridview
What Do U Mean By Tht Can You please Explain..! May Be I am New
Is It MenuCountrol?
If No Plz Ignore..
If It Helps Click It as Answer
|
|
|
|
|
r u using any third party control ? if yes then specify which control u r using at what place and how?
|
|
|
|
|
Hi Nisha
Actually I have added dll of custom controls from here . so I am making use of extended gridview control form those and now attaching context menu to a rowbased event of a context menu. Its working fine in IE and Firefox is not showing context menu on right click.
Kindly let me know how can I display Context Menu in both IE and Firefox.
|
|
|
|
|
I m sorry but i have not used this control. but why don't u post ur problem threre and specify there exactly what problem u r facing. they would be able to solve ur problem.
|
|
|
|
|
Hi all,
What type of data i can keep in global.ajax file.After login,can i store userid and username (login specific details).Please guide me.
Thanks in advance,
Srinivas Mateti
|
|
|
|
|
|
It is global.asax not global.ajax.
sris 426 wrote: After login,can i store userid and username (login specific details)
No. Are you referring to the session_start event handler? If yes, it fires when the ASP.NET session starts not when your user logs in.
|
|
|
|
|
When user logs in which event will be fired?
|
|
|
|
|
No ! Global.asax done his opertaion before that. What do you want ? Do you want to store the session informatio or what ? Please tell your business requirments.
Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I have a web application which is similar to group management.So every user will belong to one group.When user logs in I need to refer his group related details like group and and also his user related details such as userid,user name and assigned roles for him.Instead of getting these global details in every form,cant I store them in one place (global.asax) and refer where ever i required.If yes please provide the information and problems with it.
Thanks in advance,
Srinivas Mateti
|
|
|
|
|
if you want to store the information related to the user then you can do at the same place where User gets login. Just fetch the information from the DB for that user and then store it in a Session.
To store it in a single variable, you can create a simple class. just place the variables that would hold the info required by you. now it's very easy. just create the object of this class, assign values to the variables and then place this object in the session. Now access the session variable at any page .
modified on Thursday, September 24, 2009 9:28 AM
|
|
|
|
|
when user gets login successfully and if you are using FormAuthentication then Application_AuthenticateRequest will be fired but it will be in global.asax not global.ajax. i suppose there was a typo mistake(ajax).
|
|
|
|
|
sris 426 wrote: What type of data i can keep in global.ajax file
What kind of file Global.ajax is ? I guess you are asking for Global.asax . if yes, read sashidhar reply.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi!
How can I populate a DropDownList by what I select from another?
I have two DropDownLists named Industry and SubIndustry. The SubIndustry DropDownList should display information by what I have selected in Industry.
I have created a Populate_Industry and Populate_SubIndustry methods and I call the SubIndustry_Method by way of the Industry SelectedIndex_Changed event. I have set AutoPostBack="true" on the Industry DropDownList but the Populate_SubIndustry method won't fire.
I have stepped through my code and everything executes perfect but the information does not appear in the DropDownList. I double checked my databind code so I do not think its me not binding to the control.
Please can someone assist? If you want to see the code please reply and I will gladly post it for you.
Thank you!
Illegal Operation
|
|
|
|
|
Yes, post the code, it's the only way to be sure.
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
here is the code:
Variables to check DropDownList State and to get the IndustryId for SubIndustry:
bool LoadSubIndustries = true;
public int IndustryId { get; set; }
Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Populate_Industry();
}
LoadSubIndustries = false;
}
The Populate Methods:
private void Populate_SubIndustry()
{
DataSet dsSubIndustries = lookupManager.GetSubIndsutryByIndustryId(IndustryId);
ddlSubIndustry.DataSource = dsSubIndustries.Tables["Lookup_SubIndustry"].DefaultView;
ddlSubIndustry.DataValueField = "Id";
ddlSubIndustry.DataTextField = "SubIndustry";
ddlSubIndustry.DataBind();
}
private void Populate_Industry()
{
DataSet dsIndustries = lookupManager.GetIndustries();
ddlIndustry.DataSource = dsIndustries.Tables["Lookup_Industry"].DefaultView;
ddlIndustry.DataValueField = "Id";
ddlIndustry.DataTextField = "Industry";
ddlIndustry.DataBind();
}
SelectedIndex_Changed method:
protected void ddlIndustry_SelectedIndexChanged(object sender, EventArgs e)
{
if (LoadSubIndustries == false)
{
IndustryId = (int.Parse(ddlIndustry.SelectedValue.ToString()));
Populate_SubIndustry();
}
}
Illegal Operation
|
|
|
|
|
Steve,
Please ignore. I have found the problem. I have not added the table adapter to my GetSubIndustryByIndustryId method.
Boy do I feel like the idiot!!
Thanks for the quick response!!
Cheers
Illegal Operation
|
|
|
|
|
Ah, happy to be of service.
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
Have you put a break point on the bolded line:
protected void ddlIndustry_SelectedIndexChanged(object sender, EventArgs e)
{
if (LoadSubIndustries == false)
{
IndustryId = (int.Parse(ddlIndustry.SelectedValue.ToString()));
Populate_SubIndustry();
}
}
to make sure LoadSubIndustries is false? Is it even getting into this event handler? If it's not getting to the event handler, that would indicate the event isn't wired up correctly.
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
Dear All,
I using ASP.NET with AD. I can connect with my username and password, Can I get all username in AD?
Socheat
|
|
|
|
|
You want to authenticate user from Active Directory ? Or want to list of all user name from AD ?
Read this article, This will help you to find out all the answer.
Howto: (Almost) Everything In Active Directory via C#[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|