|
|
Hi All,
Can load User Control through javascript on ajax tab click event???
Thanks in advance...
|
|
|
|
|
Hey guys, I will try and keep this as concise as I can. Basically I
am developing a site which uses a Wizard Control (dynamically
generated from a database) as a search form linked to a results page
which takes out all the information from the wizard and searches the
database for matching items. I cannot make use of javascript,
sessions OR cookies and so I am totally reliant on viewstate for the
whole operation.
For this reason my wizard and results page are all one physical aspx
page and everything is handled through postbacks to retain data. I
have come to a problem though. I am now trying to implement paging
for my results page. I cannot use hyperlinks for this as they do not
postback and hence I lose all the data entered in my wizard! My
solution to this was to try to design my paging solution as a
composite control.
I have tried using both the CompositeControl AND WebControl napespaces
but whatever I try, if I click one of the buttons in my composite/
webcontrol, the click handler fails to register the click and my page
simply re-submits. I am implementing INamingContainer and I've tried
using the control type described here:
http://www.codeproject.com/aspnet/composite_controls.asp?print=true
I just cannot figure out the issue! If anyone has any ideas I would
be very greatful to hear them!
Thanks in advance, James Ward.
|
|
|
|
|
Hi James
Firstly, if you use an ASP LinkButton for your hyperlinks then they can postback.
Secondly, I've had similar problems! I ended up with a solution where I had an object that managed the presentation of the grid results (current page, total pages, the query etc). I was persisting this to session, but I can't see why in your case you couldn't serialize it and add it to the viewstate. Drop me an email at bjohns33 at hotmail.com if you want the detailed code for this.
Lastly, you might be able to come up with a solution using cross-page posting and persisting your data this way. A detailed look at the pros and cons is available here: http://www.odetocode.com/Articles/421.aspx
Cheers
Ben
|
|
|
|
|
have a button in the web page.now on closing the form i am showing the confirm message(are u sure u want to exit).
for that i am writing the following code.
<code><script language="javascript" type="text/javascript">
function abc()
{
if(confirm('Are u sure u want to exit')==true)
{
return true;
}
}
</script></code>
<code><body onunload="abc();"></body></code>
but the above code shows me the message box when i click the button.i want the message box to appear when i click the close button.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
When a button is clicked, obviously this event will fire because you are navigating away from page. To workaround with this issue, make a public variable (JS) and when button is clicked, make this variable value to true . Else it should be false . In your unload function check the status of this variable and show appropriate messages.
|
|
|
|
|
check whether you are calling the function on the OnClick event of the button.
Regards - J O N -
|
|
|
|
|
you can call your javascript methos (that showing confirm message) on "BeforeWindowClose" event of window object in javascript. in this case if a user click on the close button it fires before closing the window.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
Hello Pankaj ...
Pankaj how can i write the code it i click yes on the confirm message box.Actually i had to write some code on clicking yes.before the window gets closed.
Please help....
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
u wana close the window when u click the close the button
Piyush Vardhan Singh
|
|
|
|
|
u use this one page load
Button1.Attributes.Add("OnClick", "self.close()")
Piyush Vardhan Singh
|
|
|
|
|
<script language="javascript" type="text/javascript">
window.onbeforeunload = forClose;
function forClose()
{
mess = "You will lose all information provided\nduring navigation of this site";
return mess;
}
</script>
You can use the above code, to confirm while navigating from this page.
in the mess variable you can use your message.
if you have still any issue mail me.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
y wld u us txtspk n a cnfm wndw?
also y dnt u jst rite ths as:
function abc()
{
return confirm("sme silly txtspk");
}
|
|
|
|
|
Hi Guys,
I have a webform that lets people apply for leave.
currently on btnApply_Click, I go through a lot of validation.
My code outline goes like this:
protected void btnApply_Click(object sender, EventArgs e)
{
if(ValidateDate())
{
if(ValidateLeaveBalance())
{
//the loop goes through a few more validation before leave application is carried out
ApplyLeave();
}
}
}//apply button method end
I am trying to use btnApply.Attributes.Add("onclick", "confirm('message')"); to show the applicant his leave details before confirming application.
1) How do I put his application dates into message?
2) How do i receive the input from the user if he clicks yes or no?
3) Can this confirm- javascript run after all the validation is passed?ie:before ApplyLeave(); ?
Please advise....
Thanks so much!
|
|
|
|
|
blooper02 wrote: How do I put his application dates into message?
For that you have to call a javscript function where the entered dates are fetched and appended with the confirmation message.
blooper02 wrote: How do i receive the input from the user if he clicks yes or no?
When user clicks OK, form will post and if he is clicking cancel it won't be posted. To make this, you have to add return when calling JS function on button click.
blooper02 wrote: Can this confirm- javascript run after all the validation is passed?ie:before ApplyLeave(); ?
You have to emit the JS code after your validation is over. Use RegisterStartupScript() method for this.
|
|
|
|
|
blooper02 wrote: 1) How do I put his application dates into message?
Write a javascript function and call the function on the OnClick client event
here in the below code displaymsg() is the javascript function that displays the confiramtion message.
btnApply.Attributes.Add("onclick", "return displaymsg();");
blooper02 wrote: 2) How do i receive the input from the user if he clicks yes or no?
If the user clicks NO then it return's false and Page will not get posted back to the server. If YES then Input values can be taken and processed on the server-side.
blooper02 wrote: 3) Can this confirm- javascript run after all the validation is passed?ie:before ApplyLeave(); ?
Javascript runs on the client-side. First your client-side validation's will be performed and then your server-side validation happens...
Regards - J O N -
|
|
|
|
|
when i login into my yahoo id then in the address bar the above link occurs for specifying my id.after loged out and again login with the same id within seconds tghn the second link occurs for specyfying the id of me in the address bar.how is it possible.i want to include this in my project .so please send the source code for this .not for mailing.only if a user logs in thn his identificetion will be seen in the address bar with random numbers
First Id
http://in.f86.mail.yahoo.com/ym/login?.rand=bpt3l988dd1j8 (When i first logs in )
Second Id
http://in.f86.mail.yahoo.com/ym/login?.rand=acipfkovoqo59 (when i logos out within esconds and again logs in this number will be generated)
|
|
|
|
|
Write your own algorithm which generates this random key.
SreejithAchutan wrote: so please send the source code for this .not for mailing.only if a user logs in thn his identificetion will be seen in the address bar with random numbers
|
|
|
|
|
what is the algorithm for that pls send it to me
|
|
|
|
|
SreejithAchutan wrote: what is the algorithm for that pls send it to me
I am not working for yahoo. And if you are ready to pay me, I will write it for you.
|
|
|
|
|
no i dont want to encrypt yahoo ids.i want the algorithm for general encryption
|
|
|
|
|
|
Hi,
I am facing a problem ...I am using requiredfieldvalidator for dropdownlist and regularexpressionvalidator for textbox entering email address all these controls are placed in updatepanel(ajax)....first time error messages can see ..but after selecting one item from dropdownlist error message can't see but actual validation are taken place in the background...
how can i solve this..ie. how to show error messages while something failed,,,
please help me
alex.
|
|
|
|
|
Hi,
I'm using system.net.mail class and my smtpserver is localhost.
i found no errors in the code but my mails are storing in the mailroot/queue folder and its not delivering to the receipient.
My system is in network and using a proxy server, i'm using exchange server to get mails, is that anyway i need to reconfigure my system to send mail?
please help me
Regards
Shiva
|
|
|
|
|
Shiva Srivatsav wrote: my mails are storing in the mailroot/queue folder and its not delivering to the receipient.
Because your local SMTP server won't be working. Start it from IIS settings
|
|
|
|