Showing posts with label control. Show all posts
Showing posts with label control. Show all posts

Wednesday, March 28, 2012

Why Popup Calendar doest trigger textbox event OnTextChanged?

A textbox connect to an Atlas Toolkit Control PopupCanendar.
There is a javascript for OnTextChanged event of this textbox.

When using popup calendar to select a date for this textbox, it doesn't trigger this event.
But if type date in textbox directly, it is OK. the OnTextChanged will be fired.

Why? what's the solution for this case?The DOM is a little weird in that script changes don't tend to fire the associated event handlers that get fired when the user makes a change. It sounds like you're hitting that here. It's possible to fire the event from script, too, so maybe you want to try that. If you switch to PopupControl's CommitScript mode, I think you should be able to make this change fairly easily.

Why Properties Sub Controls?

I don't understand why ACT always uses a special sub control within its controls.

Usually in ASP.NET controls are designed to have attributes on their own. Why this design?

TIA,

Axel Dahmen

Hi Axel,

The Toolkit sits directly on top of the ASP.NET AJAX Framework, which chose to use this approach. I think it's because this is how control extenders work in WinForms and they were going for a familiar approach - but this has actually been changed in the beta so that the properties, etc., have been moved up to the extenders.

Thanks,
Ted

why ScriptManager is not recognized by VS?

Hi,

I drag and drop AJAX ScriptManager control to the source view of default.aspx, here is the code (the third and fourth lines are for ScriptManager):

<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
Status:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem Selected="True" Value="false">Active</asp:ListItem>
<asp:ListItem Value="true">Complete</asp:ListItem>
</asp:DropDownList>

But I found ScriptManager tag is underlined with curly red line. When I mouse hover on ScriptManager tag, I see a tip

Element ScriptManager is not a known element. This can occour if there is a compilation error in the website.

But I could compile and run the site successfully. The bugging thing is that all the AJAX control, such as UpdatePanel is not recognized by VS too.

any idea?

Thx

Tao

From what I know, this is what is happening...

The cause for this error is, in your web.config look for this tag...and change the tagprefix from default asp to anything else...

<controls>
<add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls
and now change the <asp:UpdatePanel> to <ajax:UpdatePanel> . All your errors should be gone.

please Let us know if this fixes...


This does solve the problem. But I don't understand why. Originally, the AJAX control defined in System.Web.Extensions is registered as tagPrefix = asp. So when I use asp:ScriptManager tag, VS should be able to locate the assembly and recognize it, theoritically. Do you know why I have to replace "asp" prefix with something else, such as ajax?

Thx

Tao


Theoretically I too expected the same. We found this fix on some blog(Thanks to him for posting it), I forget the link!. But it solved the dirty red squiggly lines and I made a note of it. May be, experts here can give hind sight of why and the details behind this...

Happy Coding :)

Why ScriptManager in MasterPage is not enough to the toolkitExtender control?

This is the error I get when look on a page and drop the User control that include the ajaxTooltip from any type.

Any suggestion?

The Error

Do you use ScriptMangerProxy?you need to use ScriptManager/ ScriptManagerProxy both for master page.

Where to add the ScriptManager and where to add the ScriptManagerProxy to get a clear design time project developing?

To explain the controls, pages, masters I have, here are they:

1. A master page that include a ScriptManager (I try to include a ScriptManagerProxy also).

2. A page that inherit the MasterPage and have a User Control in it by design time(drag and drop).

3. A User Control that have a modalPopupExtender in it, that work properly.

My only problem that other developers use my User Control in them Pages and the User Control(that added to the page) raise a:

Error Rendering Control

An unhandled exception has occurred.

The control with ID 'MpdalPopupExtender1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

What can I add to the Page, Master or may be web.config?

Why The Toolkit DLL is much bigger than download

I download the Version 1.0.10301.0 Ajax Control Toolkit. Both of With Source code and without .I found a question.The ajax control toolkit dll file which is in the without source code package is 764KB(in "\SampleWebSite\Bin" ),but the dll file I generated from the source code is near 1.3MB. Why?

if you compiled in Debug mode, then your assembly would be larger than if you had compiled in Release mode.


oh~~~~~~~~ Right! Thanks for your help answer!

Why this code does not work when its button is inside the AJAX “UpdatePanel” control ?

protectedvoid DownlFile_Click(object sender,EventArgs e)

{

string web_path ="./ items/part1.pdf";

string path = Server.MapPath(web_path);

FileStream MyFileStream =

newFileStream(path,FileMode.Open);

long FileSize;

FileSize = MyFileStream.Length;

byte[] Buffer =newbyte[(int)FileSize];

MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);

MyFileStream.Close();

Response.ContentType ="application/pdf";

Response.AddHeader

("content-disposition","attachment; filename=part1.pdf");

Response.BinaryWrite(Buffer);

}

Hi paradise_wolf,

You can't use Response.Write in a AsyncPostback trigger event of an UpdatePanel. You need move the button outside the UpdatePanel or register it as Postback trigger.

Hope this helps,


Hispvlong

I am not sure if "RegisterAsyncPostBackControl" registers the button asPostback triggeras you suggested to do. I am getting this error message:

"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '%PDF-1.3%□□3389 0'."

Below is the relevant ASP.NET web form code and the added C# code:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

protectedvoid Page_Load(object sender,EventArgs e)

{

ScriptManager1.RegisterAsyncPostBackControl(DownlFile);

..

}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<asp:UpdatePanelID="ITEMS_LIST_EREADER_PANEL" runat="server"

UpdateMode="Conditional">

<ContentTemplate>

..

<asp:ButtonID="EreaderBtn"runat="server"Text="Next"

OnClick="EreaderBtn_Click"/>

..

</ContentTemplate>

</asp:UpdatePanel>

<asp:UpdatePanelID="DOWNLOAD_PANEL"UpdateMode="Conditional"

runat="server">

<ContentTemplate>

..

<tableID="DownloadDialogTb"visible="false"runat="server">

<tr>

<tdalign="center">

<asp:ButtonID="DownlFile"runat="server"Text="Download"

OnClick="DownlFile_Click"/>

</td>

</tr>

</table>

..

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlId="EreaderBtn"

EventName="Click"/>

</Triggers>

</asp:UpdatePanel>


Hi paradise_wolf,

You should use RegisterPostBackControl method to register a control as Postback trigger.

Hope this helps,


Thank you very much,spvlong . Big Smile

hi,

I am also getting same problem while generating PDF? i could not solver even after registring as postback trigger control. It gives me the same error.

If you have solved it, plz suggest the solution for the same.

thanks

Varsha


http://forums.asp.net/1662626/ShowThread.aspx#1662626

why using Application Services?

Hi!

Why using Application Services?, I want put my login control in updatePanel?

Which is better?

Saludos,

Both is correct, this is what they call Client Side Model vs Server Side Model :-)


Oh, only that, Thanks :).

Saludos,

Wierd behavior with the ratings control

I noticed that the hyperlink on the stars within the ratings control points to "#". On the samples page it works fine, however, on my page, when you rate, the page gets anchored to the top.

What is the reason for this problem? I have set the EnableAutoPostBack propery to false, so that is not an issue here. The page does not refresh(there is no postback), but the page anchors to the top.Any tips?

Thanx.

Premal.

Hi Premal,

Would you please provide asimple repro and youAjax Control Toolkit's Version? Without these, I'm afraid that we cannot figure out the exact root cause.

Best regards,

Jonathan


What is simple repro?

Premal.

Monday, March 26, 2012

wildcard search in listsearch control

Is there any plan to add wildcard search in listsearch control? It would be a great featrue in my opinion.

Please submit an itemhereto notify our product group this feature request. Thanks.


Please also post the item's url in this thread for benefit of the community.

Will new controls run in VB project

I notice that the November Control Toolkit controls are written in c#.
Can they be added to a VB project?
Thanks in advance.
Glenn Michael

Found the answer in the FAQ for the forum. Please excuse the post...

window.debug.isDebug is null or not an object

I have user control which contains UpdatePanel. For UpdatePanel I have tried to put UpdatePanelAnimationExtender, but there's coming javascipt error which says "window.debug.isDebug is null or not an object". Without UpdatePanelAnimationExtender UpdatePanel is working great. I'm using ASP.NET 2.0 and latest AJAX Framework and ControlToolkit. What could be wrong?

Thanks
juster

You likely have old scripts from an AJAX CTP or Beta cached on your web server or on your browser. Reset IIS and make sure you do a CTRL-F5 on your browser.

Wishtlist? Yahoo UI Ext like Toolkits

Hey all,

I'm just saying.. and it's my personal opinion. In most cases, I don't find most of the Ajax control toolkit useful in my every day apps. The only ones I see that are really useful to me are ModalPopup, Accordion, mabye Calednar, but other than that, it doesn't contribute much to the end user experiences. I feel like it's a bunch of random old javascript library got wrapped in .net controls. (No pun intended) What we have is cool, just not so useful (again just my perosnal feeling)

I wish Ajax Control Tool Kit could actually serve some real stuff, real GUI componets like Grids, Dialogs boxes, Tabs, u know, the stuff you see in windows. Take a look at the Yahoo GUI Ext Grid (resize, drag/drop column, edit in place)
http://www.yui-ext.com/deploy/ext-1.0-alpha3/examples/grid/edit-grid.html

Tabs
http://www.yui-ext.com/deploy/ext-1.0-alpha3/examples/tabs/tabs-adv.html

Menu
http://www.yui-ext.com/deploy/ext-1.0-alpha3/examples/menu/menus.html ( okay, we can wrap out menu control inside the updatepanel, this just serves as an example)

Even a FeedViewer using a composite of others

http://www.yui-ext.com/deploy/yui-ext/examples/layout/feed-viewer.html

These are the Gui componets that actually helps our user experiences and are commonly used. I guess I'm just trying to say if we can focus a bit more on the real stuff, it will be SO MUCH more useful to the MS Ajax suite. I hate the fact others are beating us to it and I have to use MS ajax on the backend while using others on the front end.

Hmmm...interesting post!

I don't totally agree with what you are saying as I think a lot of the stuff in the toolkit at the moment provides a good foundation of AJAX controls (although admittedly there are some that I will never use). However, it would be nice to see some richer controls like the Feed Viewer example that you provided which really give the toolkit the wow factor..."the wow is now" or something like that ;-)

The toolkit already has Tabs and you can do Menus as you say. A rich AJAX grid control should be right up there though I reckon. There is acontrol wishlist that shows what is on the radar at the moment for the dev team and you can always make suggestions in CodePlex and drum up some votes to get priority.

I think it is a case of playing catch-up with the other AJAX stuff out there but the advantage of the MS toolkit is that it is so nicely integrated with the ASP.NET framework and with great serverside support for the controls too. I'm really encouraged by this project but it maybe just needs a bit more resourcing to shift it up a gear??


Thanks for your feedback Liming.

If you take a look at the latest version of the toolkit we have added a newTabs control. Thedropdown extender may serve your menu requirement. We have anajax grid item very highly demanded on our issue tracker. The feedviewer is a great idea. We just discussed this today with one of our contributors, Jim Zimmerman, who is here for the MVP summit. You can alwayscreate a new work item for it and we will let the community decide.

Please let us know if you have more detailed comments and we can discuss possible solutions to help make the toolkit more useful for you.

Kirti


Hey guys,

Thanks for your reply. I was just trying to compare the toolkit with others, and it was the "wow is now" moment. Didn't know there was this wiki of feature requests before, lots of good stuff there and it made me feel really comfortable to know what might be coming back :)

Thanks again.Smile

Saturday, March 24, 2012

Without installing Atlas, its not working in IE

I am developing Website Application using VS 2005 and Atlas June CTP. In the application, one page contains user control which has two Dropdown lists. Depending upon the value of first dropdown list, using Atlas, second list will get populated. I have added UpdatePanel control in user control (ascx page) for second list and Script manager in aspx page. I have added reference of Atlas.dll and modified Web.config also. This is working in IE and FireFox.
If I uninstall Atlas and run the application, it's not working in IE. To make it work in FireFox, I need to include "Scriptlibrary" folder into solution. But in IE, "SelectedIndexChanged" event is not getting triggered.
The application is working fine for both the browsers on machine where Atlas is installed. Which other assemblies are required to run Atlas on the machine where Atlas is not installed?

Thanks in advance,
Milind

hello.

well, if you're not using the atlas toolkit, then you only need the atlas dll.


Hello,
I am not using Atlas toolkit. Atlas.dll is already present in the "Reference" but still it's not working. Everything is working fine on developer's machine where Atlas is installed.

Thanks,
Milind

hello again.

the only thing that occurs to me is if the web site is not configred as a web app or is not using asp.net 2.0...

Wizard and text/xml-script question

I am using a wizard control.

At the bottom of the page I have this:

<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<components>
<control id="divSample" visibilityMode="Collapse"/>
</components>
</page>
</script>

I get an error saying that divSample does not exist - but there is a div named divSample on this page.

Can you provide the complete repro?

It's sensitive data - so I created a mock up of what is occurring:

Note - because the control is on 'step 2' it doesn't see the control.

<

asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server"><atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="True"></atlas:ScriptManager><asp:WizardID="Wizard1"runat="server"ActiveStepIndex="0"><WizardSteps><asp:WizardSteprunat="server"Title="Step 1"> Welcome, click next to continue...</asp:WizardStep><asp:WizardSteprunat="server"Title="Step 2"><inputid="Text1"type="text"/><inputid="Button1"type="button"value="button"/></asp:WizardStep></WizardSteps></asp:Wizard><scripttype="text/javascript">function pageLoad()

{

$(

'Text1').control.set_visible(false);

}

function Button1_Click()

{

$(

'Text1').control.set_visible(true);

$(

'Text1').control.set_text('Hello World');

}

</script><scripttype="text/xml-script">

<page xmlns:script=

"http://schemas.microsoft.com/xml-script/2005">

<components>

<textBox id=

"Text1" />

<checkBox id=

"Button1" click="Button1_Click"/>

</components>

</page>

</script>

</

asp:Content>

Bumping for a follow up please.

Thank you


checking back in - thank you

Good day.

Checking back - any clues? Is this a bug?

I'd greatly appreciate some response - using xml-script in a wizard seems to be a senario that would be common?

I'll keep checking back everyday :)


I haven't played with this but I'll bet if you look closely at the generated HTML you'll see that the wizard doesn't generate HTML for Step 2 when you're on Step 1. The XML Script doesn't know that, so it goes looking for TextBox1 which, isn't there.

As far as how to deal with this...

What happens if you move the XMLScript inside of the Wizard two step?

What happens if you move the step contents into a UserControl?

The toolkit may be able to help you here since you can locate your extenders (they generate XML script) in the same naming scope as the extendee.


I will give that a try and report back - I appreciate the response.

It worked moving the xml-script to the wizard step.

Thanks for thinking outside of the box for me :)

Wizard Control

I am using the Wizard Control in an aspx page inside an Update Panel control. What I want to do is to navigate to this page and set which Wizard Step should be active dynamically. Something like :

if(Request["whichstep"]!=null)

Wizard1.ActiveStepIndex=int.Parse(Request["whichstep"]);

Now this works fine in that the correct Wizard step is shown when the page is loaded. But the problem is that the Wizard gets STUCK on this step. i.e. you can't use the previous/next navigation buttons to move forward or backwards.

Any help would be greatly appreciated (PS. we also tried taking the Update panel out, but the same problem exists).

HN.

can you post your code? where in your code are you checking the wizard activestepindex?

Hi boolie,

Thanks for taking the time.

The code is very simple. The page that is calling the page with the Wizard has button and its click event has Response.Redirect("WizardPage.apsx?step=3");

The page that has the Wizard on it checks on the Page_Load : if(Request["step"]!=null) Wizard1.ActiveStepIndex=Int32.Parse(Request["step"]);

As I mentioned, this works. The wizard shows the correct step. But the problem is that you can't navigate i.e. go backward or forwards using the previous/next buttons.

By the way I tried putting the code in various other events that is raised by the Wizard, they all have the same behaviour!


not sure this will fix the problem, but at least it might help eliminate some things to troubleshoot...

Are you checking for whether or not it's a postback before running the "if(Request["step"]!=null)..."?

something like this:

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//code would go here...
}
}

if you haven't tried this, test it and see if you notice any difference. What might be happening is that when you click on "Next" or "Previous" it's causing the page to reload which would cause the Page_Load code to run again which would show you the same step. I could be completely wrong, but at least we'll have one troubleshooting step out of the way. Let me know what happens.



Sorry. But I should have mentioned that I do test the Postback in my last Post and it still gets Stuck. Is this some kind of Bug in the Control do you think? After all they are only panels that get their visibility changed!
I kind of thought you might be checking that already. honestly, i have no idea whether or not it's a bug, but it does seem pretty strange. i'll try some tests on my own and see if i can duplicate the problem and then maybe i can help find a solution
Many Than

Many Thanks.

Looking forward to your findings.

Wizard Control problem

This is an interesting one, although I did have it working earlier, it has since ceased to function.

I have a wizard control in an update panel on a user control on a page which uses a master page. oh, on a second note, a calendar extenders style / theme seems to break if the calendar control is not on the first page displayed in the wizard bar; but thats another story and not my immediate consern.

the problem is, that the next button returns a javascript error " 'null' is null or not an object, line 105 " ... but the odd thing is that it only breaks on the second page, so the first click of the next button works and sends you to the second page, but the second one does not work.

There is some code under the next button;

Protected Sub Wizard1_NextButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.NextButtonClick
If Wizard1.ActiveStepIndex = 1 Then
'some code here
end if
end sub

but it still breaks even if I comment out all the code or change the index from 1 to 2...

Thanks for reading this far, it was a bit of a long post.

Scott

you should go to your Internet Explorer's Internet Options and then go to the Advanced Tab. There you can check out 2 options: "Disable script debugging (IE)" and "Disable script debugging (other)".

Check these out and then debug. Then you can go into more detail about the javascript error.


the only extra i can add to the error message is this

Line: 104
Char: 5
Error: 'null' is null or not an object
Code: 0

I suspect that the javascript error is in the Update Panel, but im not sure...

Sorry.


Hey scott,

since nobody responded with something useful, ill give it a try ...

The error you are getting is very wide. This error can be thrown everytime an object isn't initialised at the moment you try to allocate a value to it.

because the error is so wide it's not easy for us to give a straight to the point answer.

You could try to strip down the problem into a demoProject which replicates the error so its very easy for everyone to follow what's going on.

Another thing you could do is look at the way your wizard runs through its pages. How is it set up? When creating wizards I would go for the multiview with serveral views in it for each wizardPage and then some buttons for the navigation. I made some sort of tabsControl with a multiview in an updatepanel and some navigation and all works fine :p

Good luck!


Thanks for the reply.

It gets weirder every time I look at it. In Mozilla FF it works fine; it seems only IE7 (not tried <6) stops me moving between the pages of the wizard control.

After what you said, a thought did occur to me, it stops on the page after the page containing two ajax calendar controls... but this was the wrong line of enquiry so i copied my script and progressivly removed parts until it started working.

I think this is caused by a common variable in the javascript between "something" and the required field validator control. I am using:

Modal Popup
Calendar Extender
Update Panel
and Required Field Validators

and it works fine when I remove all the validators.

I am a little behind schedule now, but I will try and recreate this on a new project later and if I get the same results with the error, it might be a small bug.

Thanks for the advice btw,

Scott M


I found out how to fix it, apparently its the required field validators use an old API to register their script !? there is a post on here somewhere (which I failed to find) that has a link to a recently compiled version of them which works flawlessly.

Wizard Control with Validation in UpdatePanel

Hi, I met a problem that I don't know how to solve when using a Wizard control with Validation in updatePanel. I am using ASP.NET 2.0 and ASP.NET 2.0 AJAX Extension 1.0. Below is the sample code and the problem I had is that after I went to Step 2 if I click Previous Button to go back to Step 1, the validator is not showing its validation result. Did I do anything wrong in my code? Would appreciate if anyone could help! Also, got a side question that how do I preserve the value in a password TextBox if I am going from Step 2 to Step 1, i.e. if the TextBox1's TextMode is set to Password, is there anyway to preserve its value?

<

formid="form1"runat="server">
<asp:ScriptManagerID="ScriptMan"runat="server" />
<asp:UpdatePanelID="UpdatePanel1"runat="server">
<ContentTemplate>
<asp:WizardID="Wizard1"runat="server"DisplaySideBar="false">
<WizardSteps>
<asp:TemplatedWizardStepID="TemplatedWizardStep1"runat="server"StepType="Start"Title="step 1">
<ContentTemplate>
Step 1<br/>
ASDF:
<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="TextBox1"ValidationGroup="asdf"ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
</ContentTemplate>
<CustomNavigationTemplate>
<asp:ButtonID="StepNextButton"runat="server"CommandName="MoveNext"Text="Next"CausesValidation="true"ValidationGroup="asdf"/>
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<asp:TemplatedWizardStepID="TemplatedWizardStep2"runat="server"StepType="Finish"Title="step 2">
<ContentTemplate>
Step 2
</ContentTemplate>
<CustomNavigationTemplate>
<asp:ButtonID="FinishPreviousButton"runat="server"CausesValidation="False"CommandName="MovePrevious"Text="Previous"/>
<asp:ButtonID="FinishButton"runat="server"CommandName="MoveComplete"Text="Finish"/>
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<asp:TemplatedWizardStepID="TemplatedWizardStep3"runat="server"StepType="Complete"Title="Complete">
<ContentTemplate>
Complete
</ContentTemplate>
<CustomNavigationTemplate>
<asp:ButtonID="ContinueButton"runat="server"CausesValidation="False"CommandName="Continue"Text="Continue"/>
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
</WizardSteps>
</asp:Wizard>
</ContentTemplate>
</asp:UpdatePanel>
</form>Hi, my bad that I did not do enough researching before this posting, the problem has been resolved after I fonudthis blog entry of Matt Gibbs. It turns out that it is a known issue perhttp://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx, and the workaround is to disable ClientScript of the validator controls. However, if you don't like the round trip traffic, Matt has posted Ajax Validators. I was not aware of this since I did not join the beta/CTP of the ASP.NET AJAX.

Validators are not compatablw with ASP.NET AJAX Final version..

Check this link

http://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx

You can download the stable version of Validators from here

http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx


Johnny, I am curious if you ever found a solution to your other problem about losing the password value going from step 1 to step 2. I am currently facingt the same issue and I have found no answers.

I am casting the password box in the following way:

// make reference to the password step
TemplatedWizardStep passwordStep = SelectPasswordStep;

// password step
TextBox PasswordChoice =
(TextBox)passwordStep.ContentTemplateContainer.FindControl("Password");

Response.Write(PasswordChoice.Text);

When I have the Password control set as textmode=password the text value returns blank. No error, just an empty value. When I have the textmode as singleline it works. Something about a textmode of password seems to make the control lose its value. Anybody have any ideas. Is this a bug or by design for some Redmond reason?

- jq



Chetan, thanks for you replay.

Jq, I was not working the "side problem" right now, however, I think you can preserve the actuall password string when going from step 1 to step 2, and when you go back to step 1, u could assign the password back to textbox. I guess it's not a bug and should be deisgned to be that way for security reason. I hope the work around could work, if you are going try this out, please let me know the result. Thanks.


I actually wasn't even able to get to this point. My problem is that I can't do ANYTHING with the password textbox control. Moving to the next step, referencing the control via code-behind, or anything -- once I have moved past the step with the password control, I lose the value.

So when I'm at the end of the wizard and I'm creating my account, I have lost my password value. So I can't even create the account, making my entire wizard useless. With your solution, can you read the value of the password field? If so would you mind posting your code?

Thanks,

JQ

Wizard Control, UpdatePanel, and Validation causes error in webresource.axd Bug

I have a wizard control with several steps, some of which use control validation. When placed inside an Ajax UpdatePanel, the webresource.axd javascript is no longer able to reference the controls validated in the previous step, and halts on:

WebResource.axdfunction ValidatorGetValue(id) { var control; control = document.getElementById(id); if (typeof(control.value) == "string") { return control.value; } return ValidatorGetValueRecursive(control);}

where the document.getElementById(id); returns null.

A workaround is to disable clientside validation on all validation controls, which is not a great loss when using ajax, but utterly annoying when you have gone to all the trouble of writing javascript for custom validation controls, etc.

The cause is probably complex, so I shall not comment on how it should be resolved. I assume, however, that the javascript is correct in that the controls not being rendered are in fact to be found in the DOM.

At least in my case, it would be nice if the javascript checked for null and ignored the control if it wasn't there.

Anyhow, it would be much appreciated if someone would look into it.

Thanks

In Atlas 1.0 we have updated versions of the validators that are compatible with UpdatePanel. In the current CTP I'm afraid that you'll have to use some workaround.

Thanks,

Eilon


This sounds like it could be related to my problem:

http://forums.asp.net/thread/1412888.aspx

What work arounds are available for this issue? At the moment I'm displaying all the controls in divs and just hiding them, which is pretty horrible.

Thanks,

Paul

Wizard Control, Ajax and the Enter key

I've been through quite a few posts talking about problems with the Enter key in these forums, but no-one describing exactly what I'm experiencing, so please forgive me if I've missed the answer.

I've narrowed it down to a simple repeatable scenario in a VB ASP.NET application. Create a new form, add a Scriptmanager, an UpdatePanel and a Wizard control. Put a single textbox on the first step of the wizard control. This is the crucial bit: in the code-behind Page_Load event, put TextBox1.focus(). View the new form in the browser, type any text in the textbox (focus should already be set) and hit the Enter Key. It crashes with

this._postbackSettings.async is null or not an object

Any ideas anyone? If I don't set the focus in the codebehind, but click on the textbox and then enter text, it's ok.

_Ade.

Hi

I am afraid we cannot find out the exact root cause without further information captured when the problem occurs.

To troubleshoot this issue, we really need the source code to reproduce the problem, so that we can investigate the issue in house. It is not necessary that you send out the complete source of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.

Thank you.


Sorry I didn't reply earlier but I've been away for a couple of weeks.

If you do exactly what I said in the original post, doesn't that reproduce the problem? It does for me.

I can send you sample code if you like, but I'm not sure how to go about it it. The only line of code I've actually *written* is "Textbox1.focus", the rest is form creation, dragging and dropping!

_Ade

Wizard with Update Panel

I have a Wizard control with inupdatepanel . I am trying to create dynamic wizard steps in pagepre_init event, but it is giving me an error " object reference not setto an instance of an object" . without updatepanel it's workingproperly.

Thanks in Advance

Do you have a fileupload control in the wizard? If so,see this thread.

hello.

please post a simple page that reproduces this problem.