Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Default button on a web page with a wizard control...

Reply
Thread Tools

Default button on a web page with a wizard control...

 
 
Masterx81
Guest
Posts: n/a
 
      12-04-2007
Hi to all...
I'm developing my first app using asp.net 2.0, and i've a little
trouble.
This question probably was asked a million of time, but i haven't find
any working solution.
I have an aspx page with a table, on the upper/sx corner there is an
image with a logo (that cliking on it do a client script that open a
new window), on the upper/right corner there are few imagebuttons for
language selection, and in the center of the table there is a wizard
control with all it's sub controls (all label/calendar/checkbox and
textbox).

I want that when i press the enter key the 'next step' in the wizard
control will fire it's event.
As now, i've tryed ordinatig the tabindex property, and doing this
function at the loadcomplete:

If (wzdStep.ActiveStep.StepType = WizardStepType.Step) Then
ClientScript.RegisterHiddenField("__EVENTTARGET",
(Page.FindControl("wzdStep$StartNavigationTemplate ContainerID
$StartNextButton")).UniqueID)
Page.Form.DefaultButton = (Page.FindControl("wzdStep
$StartNavigationTemplateContainerID$StartNextButto n")).UniqueID
ElseIf (wzdStep.ActiveStep.StepType = WizardStepType.Start)
Then
ClientScript.RegisterHiddenField("__EVENTTARGET",
(Page.FindControl("Wzdstep$StepNavigationTemplateC ontainerID
$StepNextButton")).UniqueID)
Page.Form.DefaultButton = (Page.FindControl("Wzdstep
$StepNavigationTemplateContainerID$StepNextButton" )).UniqueID
ElseIf (wzdStep.ActiveStep.StepType = WizardStepType.Finish)
Then
ClientScript.RegisterHiddenField("__EVENTTARGET",
(Page.FindControl("Wzdstep$FinishNavigationTemplat eContainerID
$FinishButton")).UniqueID)
Page.Form.DefaultButton = (Page.FindControl("Wzdstep
$FinishNavigationTemplateContainerID$FinishButton" )).UniqueID
End If

But the 'next step' button never is the default button, the control
that fire is the first control that the page render...

What is the solution?

Really thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Wizard Control Default Button Glenn ASP .Net 0 03-07-2007 04:07 PM
How to set a button from a user control the default button on an aspx page AlecL ASP .Net 2 02-12-2007 09:15 PM
ASP.NET Wizard with Wizard Steps being User Controls bhakta.ram@gmail.com ASP .Net 0 09-21-2006 06:36 PM
Wizard control default button Ken Nipper ASP .Net 0 12-09-2005 01:36 PM
WinXP Microsoft Photo Printing Wizard, and Scanner and Camera Wizard Orak Listalavostok Digital Photography 5 07-10-2004 07:15 PM



Advertisments