|
It's just an XML file, it only provides the data for the site map.
You have to format the data by writing a program load the xml, and using upperbounds on the element count, to create a span tag on the last element, or tweak the site map control in properties.
You can try injecting a span tag
<siteMapNode url="~/UK/SubParts.aspx" title="Subpart" description="UK Subpart" />
But the server might reject it.
|
|
|
|
|
How did you generate that file??
Look, it is full of errors:
- There is no opening tag for the closing </siteMap> .
- The first content line gets closed a few lines farther down:
<siteMapNode url="~/DE/index.aspx" title="DE Home" description="DE Home">
..
</siteMapNode>
- That holds true for the following blocks, too.
- And I do not see an opening tag for last </siteMapNode> .
Conclusion:
Correct the XML of that file, and it will likely work.
|
|
|
|
|
i have small site which i am testing in my local machine.
my file structure is like
index.aspx
DE/index.aspx
US/index.aspx
UK/index.aspx
my routing code
void Application_Start(object sender, EventArgs e)
{
RouteTable.Routes.MapPageRoute("default", "home", "~/default.aspx");
RouteTable.Routes.MapPageRoute("DE_Home", "DE", "~/DE/Index.aspx");
}
i want that when i will type url like http://localhost:7745/home then my root index.aspx should load. for this i route like below
RouteTable.Routes.MapPageRoute("default", "home", "~/default.aspx");
it is working fine.
i want that when i will type url like http://localhost:7745/DE then root/DE/Index.aspx should load but in this case my routing is not working. i want to load index.aspx fine in DE folder which is in root folder. i think there is some problem in my routing for that
what i need to change in the routing like
RouteTable.Routes.MapPageRoute("DE_Home", "DE", "~/DE/Index.aspx");
please guide me what should i write that when i will type http://localhost:7745/DE or http://localhost:7745/de or http://localhost:7745/De then my index.aspx file should load from de folder......thanks
tbhattacharjee
|
|
|
|
|
Route tables are objects, and the have to be created first. I was looking at your code and it didn't look right. Routes have to be added to a collection or class.
This is the sample at msdn. I was going to write a sample, but I think I would get it wrong. I assume it's the global file, you can write this in a class as well, and call the class.
Be careful, I tried it before, and it backfired on me, with bots not seeing the routes, and cataloging the raw url, and some other stuff.
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
RegisterRoutes(RouteTable.Routes) // You have to register your routes
End Sub
Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
Dim urlPattern As String
Dim categoryRoute As Route
urlPattern = "Category/{action}/{categoryName}"
// You have to add a new object to the webserver for the route to process
categoryRoute = New Route(urlPattern, New CategoryRouteHandler)
routes.Add(categoryRoute)
End Sub
|
|
|
|
|
Hello Nishant
1)I had download demo VB project - 23.6 Kb and it is not working can you please explain how to run the same ?
2)i am developing a project for hotel in that i want to display whether hotel is available for that day or not and to show price against that day in calendar control .Can you please send me a sample code which helps me to completed this assignment .
Hotel availability is store in different table with price .So i want to bind the price against that day .Can you please suggest me a way?
Regards
Aarti Ostwal
|
|
|
|
|
Ostwal Aarti wrote: Hello Nishant
It's better when you write direct to author's article which you have download.
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi
Our Website has refrenced multiple dll's .Is there any chance to decrease performance of websites with multiple dll's refrencing. i need to improve performance of WebSite.Please suggest me better way.
Regards,
Vishnu.
|
|
|
|
|
Are these ddls are .Net ddls or com components ?
if they are managed code (.Net ddls), it will not make less effect to performance, but if they are unmangaed code, it will affect the performance.
Click "Accept Answer" button! if solves your problem...
Regards,
Anil
Complex problems often have simple solutions.. think quitely to find them...
|
|
|
|
|
The use of DLLs is rarely something that you have much choice about and is less likely to affect performance than other things such as the format of your web pages, speed of your database, efficiency of your code etc. I don't know of any tools that you could use to check this but Google is always a good starting point.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Well unless you can write your own dll, you don't have much choice.
What's inside the DLL is up to the author, and I've seen some really bad DLL code posted on other forums. I've also been the victim of really bad DLL code, so I write my own now.
The most common error are memory leaks, because they forget to destroy objects. The 2nd most common is the lack of understanding the page life cycle, so they create object in page load, and not page init.
Best bet is get ahold of the source, and take a peek.
|
|
|
|
|
Hello,
I wants to retrive regional language settings in my code. For that i used WMI.
I tried below code.
in page load : GetLoggedInUserCulture();
private static CultureInfo GetLoggedInUserCulture()
{
string folderName = string.Empty;
string sID = GetWindowsLoggedInUserSID();
object locale = Registry.Users.OpenSubKey(sID + @"\Control Panel\International").GetValue("Locale");
int lCID = int.Parse(locale.ToString(), NumberStyles.HexNumber);
CultureInfo ci = new CultureInfo(lCID);
return ci;
}
private static string GetWindowsLoggedInUserSID()
{
string userName = null;
string sID = null;
try
{
ManagementScope oMs = new ManagementScope();
ObjectQuery oQuery = new ObjectQuery("Select UserName from Win32_ComputerSystem");
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oMs, oQuery);
ManagementObjectCollection oReturnCollection = oSearcher.Get();
ManagementClass mc = new ManagementClass(oMs, new ManagementPath("ServerBinding"), null);
foreach (ManagementObject oReturn in oReturnCollection)
{
userName = oReturn["UserName"].ToString().ToLower();
}
userName = userName.Substring(userName.LastIndexOf(@"\") + 1);
oQuery = new ObjectQuery("Select SID, Name from Win32_Account where Name = '" + userName + "'");
oSearcher = new ManagementObjectSearcher(oMs, oQuery);
oReturnCollection = oSearcher.Get();
foreach (ManagementObject oReturn in oReturnCollection)
{
if (oReturn["SID"] != null)
{
sID = oReturn["SID"].ToString();
}
}
}
catch (Exception)
{
throw;
}
return sID;
}
but oReturn["UserName"] and oReturn["SID"] return me null value.
Do i need to add anything in webconfig. or any thing else am missing.. please help me
|
|
|
|
|
That code is running on the server. That means that your user must be a user of that server or the domain the server is a member of. But generally, users of a web application are different from the Windows user.
Better use cookies or a database entry for storing the language/regional settings. Show your page in a default language of your choice, and let the user decide which language he prefers, and store that information.
|
|
|
|
|
Good Idea, and nice shot with the code. But reading the registry from a web app is a no no. May work in the web dev (F5), but not in production mode on a production server.
The post above is correct. Let the user choose, then write the cookie
|
|
|
|
|
thanks for the reply
but its client requirement that they want to disply data acooring to regional setting language.
My code is working for another project but its not working in another porject where actually i need language. ;(
not sure why so
|
|
|
|
|
Go back to the beginning, and check the registry value, you may be able to get the value from the browser using javascript / jquery / json, and transmit the value back for storage. Just keep stepping through the process until something clicks. Check your Global call for the culture value, and make sure it matches your select case or switch, or route mapping.
No insult intended, but I think that will backfire on you later on down the road. ASP.net keeps tightening the security screws, so one day on a server update, it may fail at like 3am in the morning. Then you will flash back at my warning, and slap yourself in the head.
|
|
|
|
|
i tries to get regional settings in javascript , it workes but javascript runs after pageload.
i iwant that value before page load done.
i want to apply that language 1st time.
i tried to store that valaue in javascript but it gets after page load. ;(
|
|
|
|
|
You can run javascript as client startup script - head tag, and with javascript reload the page with the correct culture, via url change, or set a session variable after that.
You can use some magic like a modal popup saying sensing personal settings, and then make the switch. Use some artwork to make it look cool.
First just get the mechanics working for after the culture is known, and then polish it it with culture detection.
Those are the only Ideas I have.
|
|
|
|
|
Hi,
Is Visual Source Safe 2005 Free?
Maulik Dusara
|
|
|
|
|
|
|
I have one web application file.
it is asp.net 4.0 web application file.
now I need to run it on Visual Studio 2005 professional.
what I need for this.
I tried to run it but it shows
Configuration Error like this
Line 59: <add assembly=""System.EnterpriseServices," version="2.0.0.0," culture="neutral," publickeytoken="b03f5f7f11d50a3a"">
Line 60: <add assembly=""System.Web.Mobile," version="2.0.0.0," culture="neutral," publickeytoken="b03f5f7f11d50a3a"">;
Line 61: <add assembly=""*"">;
Line 62: ;
Line 63: <buildproviders>;
Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config Line: 61
Assembly Load Trace: The following information can be helpful to determine why the assembly 'HelpDesk' could not be loaded.
please help me to solve
|
|
|
|
|
it won't work.
in order to use asp.net 4.0 you have to have VS 2010. I don't even think VS2008 has the ability to support .Net 4.0.
you can always download the free visual web developer and that will get asp.net 4.0 support.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
hi friends
i am using logincontrol to my login page and also Create User Wizard to register new users. I now need to know how to store the datas which i supply throught the create user wizard to be store in my sqlserver database.
any help plzzzzzzz..
K.Gayathri
|
|
|
|
|
|
Hi guys just signed up on Code Project after giving on my fail google skills.
What I want:
I am interested in creating a Datagrid that will load details from database (cust driver which is configured with ODBC alredy) I don't how many rows I am going to have it all depends on the table im going to connect to.
I can't use the Wizard to establish a database Connection with the database I get an error (CAT_table doesnt exit or something like that) But I have been able to connect to the database by hard coding a connection string in the code behind file. But I am NOT able to take control of DataGrid because I am clueless.
So I need a tutorial on how to connect to a database with hardcode with the DataGRID and be able to UPDATE/DELETE my data without having to Programming methods and etc I want to take advantage of the DataGrid.
Can I please get links to Tutorials? That show how to hardcode everything, video tutorial would be awesome.
I am looking forward to your guys assistance
Thanks
|
|
|
|