Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Saturday, March 24, 2012

About SurveyQuestions.xml

Hi,

Where can I get theSurveyQuestions.xml used by "UpdatePanelHowTo6 Sample - SurveyQuestionsExample.aspx" ?

Thanks a lot.

Kevin

Hi

I also did not findSurveyQuestions.xmlon net but i have createdSurveyQuestions.xml

my selef

Best Reqard.

Fayaz Soomro

save followin as SurveyQuestions.xml

<?

xmlversion="1.0"encoding="utf-8" ?>

<Questions>

<QuestionTitle="Favorite color?"ID="1">

<Choices>

<Choice>Red</Choice>

<Choice>Green</Choice>

<Choice>Blue</Choice>

</Choices>

</Question>

<QuestionTitle="Favorite day or the week?"ID="2">

<Choices>

<Choice>Monday</Choice>

<Choice>Tuesday</Choice>

<Choice>Wednesday</Choice>

<Choice>Thursday</Choice>

<Choice>Friday</Choice>

<Choice>Saturday</Choice>

<Choice>Sunday</Choice>

</Choices>

</Question>

<QuestionTitle="Favorite Activities?"ID="3">

<Choices>

<Choice>Gardning</Choice>

<Choice>Skiing</Choice>

<Choice>Walking</Choice>

<Choice>Reading</Choice>

</Choices>

</Question>

</Questions>

About Events of Accordion Control

I want to know about events of Accordion Control.

So i want to get sample about it

Idea

Take a look at the following site:http://ajax.asp.net/ajaxtoolkit/Accordion/Accordion.aspx

Thanks for your immediate reply! I have already got the samples but I failed to find the description on control's events. The sample only mentioned about properties.


I think this is what you are looking for ..

http://blogs.msdn.com/phaniraj/pages/documentation-of-client-side-methods-exposed-by-ms-ajax-controls.aspx

Please correct me if I am wrong

a sample project using AJAX

Hi,

i am doing a sample project to use Hovermenu extender..i have taken a lablebox whenever i will take mouse over it , it can be editable..but it is showing error

"DynamicControlID must be set"

This is code...

protectedSub Page_Load(ByVal senderAsObject,ByVal eAs System.EventArgs)HandlesMe.Load

Label1.Text = DateTime.Now.ToString()

EndSub

ProtectedSub Button1_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles Button1.Click

EndSub

<System.Web.Services.WebMethodAttribute()> <System.Web.Script.Services.ScriptMethodAttribute()>PublicSharedFunction GetDynamicContent(ByVal contextKeyAs System.String)As System.String

EndFunction

<formid="form1"runat="server">

<div>

</div>

<asp:ButtonID="Button1"runat="server"Style="z-index: 100; left: 49px; position: absolute;

top: 200px"Text="Click"/>

<asp:LabelID="Label1"runat="server"Style="z-index: 101; left: 59px; position: absolute;

top: 28px"Text="Label"></asp:Label>

<cc1:ConfirmButtonExtenderID="ConfirmButtonExtender1"runat="server"

TargetControlID="Button1"ConfirmText="R u Sure">

</cc1:ConfirmButtonExtender>

<asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

<cc1:HoverMenuExtenderID="HoverMenuExtender1"runat="server"DynamicServiceMethod="GetDynamicContent"

TargetControlID="Label1"PopupControlID="label2">

</cc1:HoverMenuExtender>

<asp:LabelID="Label2"runat="server"Style="z-index: 103; left: 127px; position: absolute;

top: 171px"Text="hi"></asp:Label>

</form>

Kindly check it,

Regards,

Suryansu

To fix the error "DynamicControlID must be set" you should remove the attribute DynamicServiceMethod="GetDynamicContent"

That will solve error.Still then you will not be able to edit the label .To achive the effect you need follow the below script.

For futrher infiormation refer to the below link

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/HoverMenu/HoverMenu.aspx

One possible way to implement your requirement is as like below

<form id="form1" runat="server">
<div>
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajaxToolkit:ToolkitScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Hover Me"></asp:Label>
<div runat="server" style="background-color: Yellow; width: 50px; height: 50px" id="popup">
<asp:TextBox ID="txtLabelContent" runat="server"></asp:TextBox>
<asp:Button ID="btnChangeTheLabel" OnClick="btnChangeTheLabel_Click" runat="server" Text="Set the Label Text" />
</div>
<ajaxToolkit:HoverMenuExtender PopupControlID="popup" TargetControlID="Label1" ID="HoverMenuExtender1"
runat="server">
</ajaxToolkit:HoverMenuExtender>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>

in the server side implement this

protected void btnChangeTheLabel_Click(object sender, EventArgs e)
{
Label1.Text = txtLabelContent.Text;
}


If you get an answer to your question, please mark it solved so people don't waste time reading already answered questions!


Thanx

A runtime error has occurred. Do you wish to debug ? Help

I get the subject error when i try to run sample asp.net ajax aps and even some day to day web pages. It seems to be "an unhandled exception (persmission denied" and "Jscript runtime error: Permission denied"

Simple error but I must be simple minded. What is going on?

Thanks for any help Pauley

;

hello.
you must give us more info if you want us to help you.

Hello Luis, thanks for responding. I think I am ok, I found a post to change advanced settings in Internet Explorer to NOT give a notice of script error. I did and I think I am ok now. I assume there are flaws in some code which IE exposes when it runs and that caused the error message.

Thank you.


hello.

you shouldn't do that. in fact, you should do the opposite in order to be notified about all the errors on your pages. if you're getting an exceptio, then believe me: there's something wrong with your code!