I'm using VB.NET and Razor (ASP.NET MVC 3.0). I have a VB.NET module defined in which I declared a number of public constants. However, those constants are not being recongized in views. The constants are being recogized in my model classes.
I do import the namespace in the view (that is, the first line I have in the view is "@Imports MyNamespace"). Yet, when I try to use the constant in a statement like:
[Code]....
the constant MYFORMAT_DATE_LONG is not being recognized. And I did try putting an @ in from of the constant name too:
I am integrating ASP.NET MVC in an existing ASP.NET web form project. I have added required references and folders in web form project. However, when I right click on View folder to add a new view I don't get Add  View option.Is there a way to get MVC wizard/template in ASP.NET web form project.
What I am doing right now is I have a dev machine where I have the solution for the old web app (1.1) usually if i have to add new pages to the app what I used to do is add .aspx pages in the dev mechine and compile the solution generate new dll's and copy the .dlls and .aspx pages to the server used to work fine.Now I needed to add a page.I did the same thing some how the server is not reconizing the new page I have created. Please tell me what Should i do to make the server recognize the new page?
I am using the aspnet membership features and check to make sure the user is logged in before display the page:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me .Load 'Check for UserName If Context.User.Identity.Name Is Nothing Or IsDBNull(Context.User.Identity.Name) Or Context.User.Identity.Name = String.Empty Then Response.Redirect( "~/Login.aspx" ) End If Session( "UserName" ) = Context.User.Identity.Name UserName.Text = Session( "UserName" ) UserIDValue.Text = Membership.GetUser().ProviderUserKey.ToString() End Sub
Everything was working fine when I had two separate applications (two web.config files) using the same data base and the same "applicationName" in the web.config files...............
I have a fileupload control on my page that I use to add files to my DB. When I point it to a .swf file it fails.The file is 2.69mb.I check the fileupload1.hasfile and it is false.I have tried to increase the
[Code]....
which is over 10mb with still no luck.Any thoughts why a flash file is not recognized?
I have to maintain a very old application. What I am doing right now is I have a dev machine where I have the solution for the old web app (1.1) usually if i have to add new pages to the app what I used to do is add .aspx pages in the dev mechine and compile the solution generate new dll's and copy the .dlls and .aspx pages to the server used to work fine.
Now I needed to add a page. I did the same thing some how the server is not reconizing the new page I have created. what Should i do to make the server recognize the new page?
I have a virtual directory called "MySite.web", and a folder inside this directory called "Sell" where I have my webform Create.aspx and several user controls like CreateAd_CarsAndTrucks.ascx and CreateAd_Motorcycles.ascx.When I try to compile, I get several errors in Create.aspx stating that public partial class Sell_CreateAd_CarsAndTruck, Sell_CreateAd_Motorcycles are not recognized. I am looking at both classes right now (they're in the same folder), so I have no idea why the compiler's not finding them.One odd thing is that, for a moment, it did find one of them (Sell_CreateAd_CarsAndTruck), but from an assembly in either folder "Temporary ASP.Net" under c:Windows or the one in c:usersusername. So I closed my IDE, and deleted both folders. When I open the solution once again, it recreates "Temporary ASP.Net" under c:usersusername and then creates a "App_Web_createad_carsandtrucks.ascx.5a5f4927.ebg000r0.dll" that it uses as definition for the class. But it never uses the actual class as a definition. Basically, when I right-click on the class instance to view its definition, it takes me to metadata.
I have a zillion warning messages when I view my webform "Validation (): Element 'menu' is not supported" and every "<asp:WhatEver" tag has a green squiggly line under it.
It looks like this:
I'm using VS 2010 Pro, and have tried reinstalling it.
I have an ASP.NET multiline textbox. I can hit return to create carriage returns on the screen but the text property of the textbox is ignoring the carriage returns and simply concatenating the lines without even a space in between. I am writing this text property to a database and I want to be able to retrieve the text exactly as it was typed with carriage returns included.
Withing Microsoft's Visual Web Developer 2010 Express, I am trying to link an MS Access 2000 database to a web form using the Toolbox tool provided with the program. In the second dialog box where you specify the database to use, it shows that the Data_App folder is empty, yet in the windows explorer window the file is clearly there.
Is this a limitation of the evaluation version, too old of Access database file, or something stupid that I am doing? I gotta admit, I am a newby to .NET and ASP.NET, but I can create other aspx web forms with no problems.
I can connect to the MS Web Server, for instance.
I'd use MySQL, but it doesn't want to work on my computer.
I have created an imageurl and label ids inside an itemtemplate which is inside a datalist but when I want to do some programming based off of those two ids, the code behind files do not recognize anything inside an item template.
Is there a way I can retrieve from an itemtemplate onto say like a string in a code behind file?
To make my explanation easier this is what I'm trying to do:
I have two div tags, one on the left and one on the right.
The div tag on the left contains a datalist of an Itemtemplate of various pictures.
When you click on one of these pictures, the same picture you clicked on will display in the right div but larger width and height.
It is working absolutely fine with this root folder('myroot'). When we change root foldername to "myroot.net" handler not responding.I have checked it by RouteDebugger and it shows thatRoute: NO MATCH!Matches Current Request: True
I thought I finally had this cracked but now I want iterate through the records in my listview and do different things depending on whether the record is displaying existing data or is a blank, new record. Easy, right? Here's my code:
[Code]....
The problem is that the listview doesn't seem to recognize the insertitem as such. Obviously I don't really want that message box in there but it was just to test whether the insertitem was being picked up. The message box is never displayed.I also tried a simple iteration through the listview items with a message box popping up on each item displaying the item type. It said 'DataItem' every time, never 'InsertItem', even though there is definitely and insert item there!!
I've got an ASP.NET 4 web forms application I'm building in Studio 2010. The solution has two projects. A web forms application and a class library. I have added a reference to the class libraryr project in the web forms project, but when I go a code behind page in the web forms project, it does not recognize the class from the class library and throws the "type or namespace <class> could not be found ...." error. Adding a using <class library projec> does not work either as it does not recognize that.
I am having an issue where if I add something to an aspx file, such as adding "<asp:HyperLink ID="HyperLink1"...", the item is not recognized in the associated vb file and I get "Name 'HyperLInk1' is not declared". Nothing I've tried seems to work, and the only way I can get it to work is to delete the files from the project, then re-add them back in as a new web form. Then it works.
why this is happening, and how I get it to recognize when I add things to an asp file? Of course I save the files and rebuild the web site, and that doesn't work.
I am working on a web application. I have two forms Webform1 and Webform2 and Module1. In webform1 and 2 I have labels, textboxes and dropdownlist. when I trying to use them in the Modules I cannot see them. Here is what I have in the ASPX page:
Public Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList1.SelectedIndexChanged test = DropDownList1.SelectedValue End Sub
I want to be able to do this in the Module: Dim Test as string
I am struct in a bad sitiation. I have developed my whole application and at the end client requested that they want encrypted URLs :(. Now application is in a state where I can not encrypt URL on individual pages.Is there any module through which I can add URL encryption throughout my website without changing the application as application code is 100% verified from Q/A.
I'm probably going to use the URL rewrite module for IIS 7 eventually and I have a fairly straight forward question that I really can't find the answer to.
If you have a base case of:
http://yoururl.com/page.aspx?ID=7 You can obviously have it rewritten to: http://yoururl.com/page/7 or whatever you want.
My question is this: When using this module can you still use Request.Querystring["page"] on the rewritten querystring. How does the Request.URL stuff work. Does asp.net still provide the un-rewritten url or does it provide the rewritten one.
I would assume that your C#/asp.net code is completely unaffected by the url rewriting, as that's more or less the point, but I want to be crystal clear.
Secondary question: What is the best practice for how you should code a website when using the rewritten. Should you code links in the written style, or continue using querystrings?
Trying to use the dnn webupload control in a dnn 4.9.2 module. I am using this in the settings.aspx of my module. When I load the page I get a null exception on this line in the page_init:
I tried to set the FileType, which is what is null but it is read only. I would static the title, but I don't want to change core code, for upgrade reasons.
we want to create website based on asp.net and we want to update data in my site dialy. told me about admin module . is their any tutorials and screen shots for admin module