Click here to Skip to main content
11,435,451 members (55,173 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET MVC4
how can i transform this code to aspx?
    @Html.ActionLink("Create New", "Create") 
    @using (Html.BeginForm("SearchIndex","Movies",FormMethod.Get)){     
         Genre: @Html.DropDownList("movieGenre", "All")   
           Title: @Html.TextBox("SearchString")   
         <input type="submit" value="Filter" />
Posted 8-Jan-13 3:18am
Edited 8-Jan-13 3:33am
Zoltán Zörgő at 8-Jan-13 8:43am
medloyl1 at 8-Jan-13 9:09am
because i work with aspx forms
Zoltán Zörgő at 8-Jan-13 9:56am
In MVC4?... bad idea. But than why have you written that razor code? ;)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

All you need to know what above code does, post which you should be able to do it.

Out here:
1. Create link is present
2. Followed by a dropdownlist, a textbox and a submit button
3. On click of this submit button, you need to search the movie name (written in the textbox) based on the dropdown category.

Try out now.
medloyl1 at 8-Jan-13 9:10am
i just want to know how to convert this lines of code
can u help me plz?
Sandeep Mewara at 8-Jan-13 9:14am
I told you exactly that. Please don't expect exact code. Make some effort. Learn. Try.
medloyl1 at 8-Jan-13 9:21am
i have an exapmle that i try to follow it
this example is in razor but me i wokr with aspx fomrs
all is working but i have an execption in the aspx code because it has a diffrence between C# ans cshtml..
i just want to convert this lines of code
that s only
Sandeep Mewara at 8-Jan-13 9:24am
Did you even read my answer provided? I gave you what needs to be done in plain and simple English. IIt does not matter you are working on Java or .NET or any other language. I gave the UI details and the feature provided by it as per your MVC view.

Now, since you work on ASPX, just do step 1-3 as mentioned above.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

An easy way convert from one to the other is to run the razor view for this code, view the html source and then copy/paste that html source into your new view. At that point you just have to convert the relevant html elements into their appropriate controls.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web04 | 2.8.150428.2 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100