MVC :: Including MvcSiteMap?
Mar 18, 2010
I'm a complete newbie to ASP.NET and therefore to ASP.NET MVC. Now I have to do a project for school using ASP.NET MVC. What I want to do is to use the ASP.NET MVC SiteMap provider from [URL]But I'm already struggling installing it. It says I have to download and compile it, add a reference to the assembly and register the provider in the Web.config file. So far so good. But I have no clue how to compile it (or WHAT to compile), how to add a reference to the assembly and actually WHERE the assembly will be. The download contains a solution with a sample webproject and a McvSiteMap.Core project.
View 1 Replies
Similar Messages:
Jan 2, 2010
I'm trying to learn ASP.NET programming and here's my first big issue I need to solve:- I like to keep code separate from presentation so I've decided to use code-behing model - I've created default.aspx + default.aspx.cs and everything works nicely- Inside default.aspx.cs, in
[Code]....
I want to instantiate an object where its class is declared in a separate file and is part of a separate namespace. This is a simple PDF generation class that I wish to develop and use in other web and also desktop projects, that's why all these separation.- As a web developer I tend to avoid all kind of IDEs, as a result of this I am independant and I know every line of code in details. Do you think it is possible to bypass VisualStudio and code all the projects by hand? I believe this is quite possible with pure C# code but what about the problem I've described above? Can somebody please write the minimum directive(s) to include an external class or file. (I know about VS 'Add class...', etc. )
View 5 Replies
Dec 2, 2010
i have following string
string url =
string.Format("http://localhost:1388/WebSite1/Login.aspx?username={0}&password={1}",loginname,password);
string str =
"Dear" +
" " + txtName.Text +
" " +
"you are successfully registered on our site" + System.Environment.NewLine
+ "Your login details are given below" + System.Environment.NewLine
+ "Username:" +
" " + txtName.Text + System.Environment.NewLine +
"Password:" +
" " + txtPass.Text +
" " + System.Environment.NewLine+"please
click on the followinf link to confrm your registration"+System.Environment.NewLine+url;
here the string url show hyperlink in the text "http://localhost:1388/WebSite1/Login.aspx?username=" but i want hyperlink in the whole string including username and paassword value.
View 3 Replies
Feb 21, 2011
I am writing web site using ASP.net, and I want to seperate my pages into some logical HTML parts (menus, panels, etc.).
When it comes to parts that have a server logic, the obvious solution is to use UserControl, but most of the parts on my site, have client side logic only, i.e javascript and HTML. Recently I found out that it's possible to include parts by using the code:
<% Response.WriteFile ("MyPart.html") %>
So my question is: what is the better way to do it? should I write a UserControl for each one of my parts, or should I user Resonse.WriteFile (...) for my non-server-side logic parts?
View 2 Replies
Nov 23, 2010
I have 4 texboxes where 3 of them value gets inputted into the fourth one when the button is clicked. This is good, however, how do I include anyother text to be submitted within textbox 4?
[Code]....
View 4 Replies
Mar 17, 2011
I'm using msbuild to automatically build and package a website ready for deployment. When I compile and then Publish my project through Visual Studio 2008 everything works fine However when I use msbuild I'm getting errors because AspNetCompiler is trying to compile aspx and ascx files that are not included in my .csproj, but still exist in version control. I know I can just remove them from version control, but can anyone tell me why these files are being compiled?
Here is my msbuild task.
<AspNetCompiler
TargetPath="$(PackageDir)Web"
VirtualPath="/"
PhysicalPath="$(buildDirectory)Web"
Force="true"
/>
View 1 Replies
Jul 7, 2010
I am trying to "behind the scenes" log myself into a website, from the VB code behind my ASP.NET website. But I am dumbfounded as to how to do this.
As far as I know I should be using the WebRequest or Webclient class. That is about as much as I know. I am not sure how to use the class.
I want to click a button on my website and have its Click event send a username and password to another website. This other site isot affiliated with mine. I realize the concept may seem stupid, but I plan on taking this further later, but Just need to know this now.
View 1 Replies
Mar 10, 2011
I have two tables.[Table.Game] Columns are "PK_id" "username" and "couponID" [Table.Coupons] Columns are "PK_id" "CouponID" and "Points" The two columns "CouponID" are associated with eachother. Let say i have two rows with the user "harry" in [Table.Game] this person has two different couponID. In [Table.Coupons] this user "harry" has "CouponID" 1 and 2. Column "Points" have 10 and 20. To the question how do u sum this two different point values that have different "CouponIDs". This does work if i have only one "CouponId". But not when the user has 2 different CouponIDs. Values is 0
var points = (from p in linq.Coupons
join g in linq.games on p.couponID equals g.couponID
where g.username == username && g.couponID == p.couponID
select (int)p.win).Sum();
View 2 Replies
Apr 22, 2010
What I need to be able to do is create a field in my gridview that contains a link that passes two variables. One is pulled from within the gridviews datasource and the other needs to be pulled from a textbox control outside the gridview.
From what I've read so far you cannot use a hyperlinkfield for this as the datanavigateurlfields cannot be set to pull from anything but the gridview's data source.
What I attempted to do was create a template field where in the itemtemplate I called:
<a href="example.aspx?e=<%# Eval(ExampleList.SelectedItem.Value) %>">Test</a>
That comes back with an error like this:
DataBinding: 'System.Data.DataRowView' does not contain a property with the value 'TestData'
View 1 Replies
Feb 21, 2010
Whats Different between
<!--#include virtual="JS.htm" --> //note that in this method all JS files imported like below in JS.htm
and
<script src="myjavascript.js" type="text/javascript"></script>
View 4 Replies
May 21, 2010
how to retrieve complete url of a website including http?
example: [URL]
View 3 Replies
Jan 28, 2010
Is it possible to include a static email address within a textbox text property...For instance
<Asp:Textbox id="myTxtBox" runat="Server" Text="Contact me <a href="mailto:test@test.com">here</a> </asp:TextBox>
The above line tells me that the element <a> cannot be nested within textbox.
View 14 Replies
Sep 7, 2010
We've got old ASP.NET Forms pages and new MVC views and partials views in the same solution. Some pages on the site are MVC, and legacy pages are Forms. One of these legacy Forms pages is an .ascx control. Is there any way for me to insert an MVC partial view (.ascx) into this Forms .ascx control?
View 3 Replies
Mar 1, 2011
how can I build 'compiled query' includes lots of paramters. Example. I use only one parameter in this code.
[Code]....
How can I write a query that it can takes lots of dynamic parameters and dynamic conditions.
View 5 Replies
Jan 24, 2011
I´m trying to get the full URL from a page including querystrings. It works as long as the querystring is lower then 10. If it contains more than one number it does not work.
I try:
Dim v As String = Request.QueryString("kund")
Dim myDescription As String = "Ring kund " & " " & "Http://backup/heat/Dial/kundkort.aspx?kund=" & v & "url: " & Request.Url.AbsoluteUri
It will not work unless here is only one digit in the querystring. It works in my other codes for selecting data from a table etc.
If I would try the URL http://backup/heat/dial/kundkort.aspx?kund=86
my output will be:
Ring kund , Http://backup/heat/Dial/kundkort.aspx?kund†url: http://backup/heat/dial/kundkort.aspx?kundâ€
It is justa cross sign instead.
View 4 Replies
Jan 4, 2011
Let's say I want to forward all requests at /js/* to a JavaScript controller Index method. In other words, these routes should all invoke JavaScriptController.Index():
/js/root/index.css
/js/user/account/index.css
/js/master.css
What would the route definition be in my Global.asax.cs file? This doesn't seem to work:
routes.MapRoute("JavaScript", "js/{*path}",
new { controller = "JavaScriptController", action = "Index" });
The breakpoint is never invoked during Debug mode with:
public class JavaScriptController : Controller
{
[HttpGet]
public void Index(string path)
{
var browser = HttpContext.Request.Browser;
System.Diagnostics.Debugger.Break();
}
}
View 2 Replies
Sep 22, 2010
Currently I am able to bring the datetime from my SQL table but I also need the milisecods. Here is the line of code:
[Code]....
So latestTimeStamp = {9/22/2010 6:24:09 PM} but I needed it to be latestTimeStamp = {9/22/2010 6:24:09:080 PM}
since the SQL field value is 2010-09-22 18:24:09.080 and I want to do an accurate datetime comparison.
View 2 Replies
Jun 5, 2010
I am testing with ASP.NET Webforms and get some errors wich I cant understand whats going wrong.When Publishing the Webform via FTP op http://ipadress/ including a normal ftp user and password and click publish I get the following error:
----- Build started: Project: WebApplication1, Configuration: Debug Any CPU ------
WebApplication1 -> C:UsersDaveDesktopWebApplication1WebApplication1inWebApplication1.dll
------ Publish started: Project: WebApplication1, Configuration: Debug Any CPU ------
Connecting to http://ipadress/...
Unable to create the Web site 'http://ipadress'. Moved Permanently
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
Note: http://ipadress/ is actually a IP adress (just a normal windows shared hosting server at ISP)
Also when publising my MSSQL2008 database I get some errors (I connect via IP adress and db user and password on SQL authentication).
View 1 Replies
Jan 19, 2010
I'm creating a search box control including 1 textbox, 1 button.
What I want is textbox has the value "Type here..." initially, then if I put focus on that textbox, the value would disappear, and it show off when it lose focus like Google search box
I've done with that, but one problem arised, that is when i type new value to textbox and hit the button, for demonstration I add new Label and assign the value I just typed in to it but it didn't work. The value always is "Type here...".
[code]
View 4 Replies
Feb 12, 2010
We are looking at integrating a full-blown GWT (Google Web Toolkit 2.0) application with an existing ASP.NET 3.5 application. My first gut reaction is that this is a horrible frankenstein idea. However, the customer has insisted that we use this application developed by a third-party.
I have almost NO CONTROL over the development of the GWT app.
My first thought is to actually attempt to embed this in an iFrame. Because GWT is running under Tomcat/Jakarta, it is hosted on a different server from the .NET app so the iFrame src will be to a URL on the other machine.
I need to utilize our own ASP.NET authorization scheme to restrict access to the embedded GWT application. The GWT app also uses embedded java applets, which don't seem to be working right now inside the iframe. The GWT app makes calls to a backend server (using GWT-RPC?).
View 2 Replies
Feb 10, 2011
I want to be able to store strings in the DB but some are long and i want to format them such that when i copy them out of SQL and past them into notepad they have line breaks to break up the otherwise single line that runs on forever and hard to read.
lets say i am storing a string of all the session variables like this, how do i include line breaks in here?
StringBuilder theBody = new StringBuilder();
theBody.Append("Session Values: " + "
");
foreach (string s in Session.Keys)
theBody.Append(s + ":" + Session[s] + "
");
View 1 Replies
Jul 14, 2010
I'm writing a web site (ASP.NET/C#) that is specifically targeted at mobile phones.On the master page I have put an ASP menu. This works fine in IE8 and Firefox, but when I try viewing it from my Nokia browser, while the menu is visible, its behavior is incorrect: I tap on the menu to open it, and instead of opening the next level of menus, the control disappears altogether!Interestingly, I got the same behavior using Chrome on my computer.I haven't yet tried on Safari, but the message is already pretty clear: the ASP.NET menu control doesn't work on the Nokia browser, and that is a showstopper. What alternatives do I have? It needs to work on Nokia, Safari and Opera, at least.I saw in a similar question that someone suggested writing a custom server control. Nice idea, I'm sure... but how do you explain that to this ASP.NET newbie?
View 1 Replies
Jan 27, 2010
I have a folder structure that is odd and I need to find a way to deal with. Example, if you go to site.com/x/y/z/, I would like to have a script in the /x folder that grabs all incoming requests, even if the request was to /x/y/filename or /x/y/z/1/2/filename. Is it possible?
View 1 Replies
Jan 7, 2010
I want to generate an overview for the user where he can see all columns in a table.Format is like:
columname | comlumntypecode | columntypename
Where I'm assuming that a column of type int must have some sort of typecode, e.g. 7
For example:
firstname | 4 | nvarchar(30)
lastname | 4 | nvarchar(50)
birthdate | 5 | datetime
uuid | 9 | uniqueidentifier
What is the SQL to get such a result?
View 3 Replies
Jan 26, 2011
I have tried to deploy a project using Windows Installer Deployment. And Successfully installed it in computer. But it is unable to connect with the Database in my system. Earlier the same project worked from my Visual studio but it is not working after the deployment.
View 3 Replies