Question : asp.net and silverlight 3 problem

hi

i am new in silverlight and afer some effort i design a login form using expresson blend, now i am completely confused the reason is i putted click event in xaml button, now i want to redirect this page on the other page when  i click on this button but the problem is when i am trying to type Response.redirect C# code behinde not exposing Resonse method and when i put this code forcefully then giving me error. please give me path so i can start working on silverlight for my web application.



Thanks

Answer : asp.net and silverlight 3 problem

In a Silverlight application, you can have multiple XAML pages. When you use the .xap file in the web page, only one XAML control will be displayed at a time. The default XAML file displayed is determined by the following code in the App.xaml file:

this.RootVisual = new Page1();

You can change the above line to the class name of any oher xaml file to open that file by default.

Another scenario is, you may want to open different xaml files from the default xaml page. For example, consider that you have a xaml control that prompt user to enter login information. After the login credentials are validated, you may want to redirect to another xaml file when the user click the "Submit" button.

This can be done by setting the "Content" property of the xaml page.
private void SubmitButton_Click(object sender, RoutedEventArgs e)
{  
     this.Content = new NewXamlPage();
}

The above code shows how to set the "Content" property of the xaml control in the button click event handler. When the user click on the submit button, the new xaml file (NewXamlpage) will be opened and original xaml file will be recycled.
Random Solutions  
 
programming4us programming4us