|
Instead of having a sitemap with Visible property
it's easier to have 2 sitemaps:
1. with visible nodes only
2. with all the nodes
This will allow you to bind the menu control to the visible sitemap
and to get other nodes from the other sitemap
you can configure the names of the 2 sitemap providers in web.config
see this msdn article to know how:
http://msdn2.microsoft.com/en-us/library/ms178426.aspx[^]
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
|
|
|
|
|
Hi,
Are you talking about dependent site maps?
I will explain my problem:
My web site uses two different web site maps:
1. The full one which is used in the menu.
2. The most restricted one which is a part of (1) and that is used in footer links.
3. In both cases I need to have everything in two cultures: English and Portuguese.
Could you give me your opinion of how to create this?
Thanks,
Miguel
|
|
|
|
|
I'm not sure if you can create resource files for sitemaps to localize them.
I had a similar problem before and I had to create a different copy of sitemap for each language.
In your case you will need 4 sitemaps (2 for each langauge) and have some code to decide which sitemap that will be used according to the current culture.
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
|
|
|
|
|
After searching the MSDN I found that you can have resouce files for sitemaps to localize them.
check this page:
http://msdn2.microsoft.com/en-us/library/ms178427.aspx[^]
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
|
|
|
|
|
hi i am creating a asp.net form which includes on text fileld for customer id which is to be auto generated. i got a for auto generation code for customer id, but it is written in vb.net.I want the same code to be written in c#.Can any help to write the code in c#. I have tried to write the same code in c# but it is throwing an error.
I am posting the vb.net code for auto generation.Can any one convert the followin code for me in c#.please it is urgent as i required in my project.
Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click
' Following is the code for auto generating the costomer id
Dim ctr As Integer
Dim len As Integer
Dim custid As String
Dim custidval As String
dt = Dscust1.Tables("customertracking")
len = (dt.Rows.Count - 1)
dr = dt.Rows(len)
custid = dr("custid")
custidval = Mid(custid, 2, 3)
ctr = CInt(custidval)
If ctr >= 1 And ctr < 9 Then
ctr = ctr + 1
txtcustid.Text = "c00" & ctr
ElseIf ctr >= 9 And ctr < 99 Then
ctr = ctr + 1
txtcustid.Text = "c0" & ctr
ElseIf ctr >= 99 Then
ctr = ctr + 1
txtcustid.Text = "c" & ctr
End If
txtcustid.Enabled = False
End Sub
Pranav Dave
|
|
|
|
|
if customer id is an integer value then why would you want it to create like this.
database can create you an id and have it increased by 1 for each data insertion.
why dont you let the database take care of this
|
|
|
|
|
The following was produced with our Instant C# VB to C# converter:
//TODO: INSTANT C# TODO TASK: Insert the following converted event handlers at the end of the 'InitializeComponent' method for forms or into a constructor for other classes:
btnadd.Click += new System.EventHandler(btnadd_Click);
private void btnadd_Click(object sender, System.EventArgs e)
{
// Following is the code for auto generating the costomer id
int ctr = 0;
int len = 0;
string custid = null;
string custidval = null;
dt = Dscust1.Tables["customertracking"];
len = (dt.Rows.Count - 1);
dr = dt.Rows[len];
custid = dr("custid");
custidval = custid.Substring(1, 3);
ctr = System.Convert.ToInt32(custidval);
if (ctr >= 1 & ctr < 9)
{
ctr = ctr + 1;
txtcustid.Text = "c00" + ctr;
}
else if (ctr >= 9 & ctr < 99)
{
ctr = ctr + 1;
txtcustid.Text = "c0" + ctr;
}
else if (ctr >= 99)
{
ctr = ctr + 1;
txtcustid.Text = "c" + ctr;
}
txtcustid.Enabled = false;
}
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Instant Python: VB to Python converter
|
|
|
|
|
hi,
I have a user control for registration of user. Now i need to submit the fields with ajax method in database. When insertion is completed successfully,
need to load other control by a javascript function in the same page with success message.
for e.g.
page1.ascx
function insert()
{
var message = insertdata(); // insertdata is an ajax method.
//load other control on this page with above message displaying on that control with some label control or literal control
}
any help is appreciated,
regards,
max
|
|
|
|
|
System.IO.Ports is not available in asp.net vb.net 1.1 ? if not is there any other that works like that?
|
|
|
|
|
Hello everyone:
Would you be able to give me some practical examples as to where I would need to implement Singleton classes?
For e.g. if you could point out the scenarios where I must or should implement a Singleton class etc. I sure would appreciate your help. Thanks in advance.
Regards,
Robert
|
|
|
|
|
Singelton classes are used when you wan't to have only one instance of a class.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Dear CWIZO:
Thanks a lot for your reply; I understand the concept of Singleton classes but for some reason I am unable to identify the scenario where I would need just one instance of a class.
In other words 'why' would I need to have just one instance of a class? A practical (real world) example will be highly appreciated . Thanks again.
Regards,
Robert
|
|
|
|
|
Well once could be a class for logging application errors. Since you don't wan't two clases write to the same file at once you make a singelton class.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Maybe I'm way off base here, but wouldn't you either want multiple instances of this class so different threads don't change property data behind one another? Or maybe a static class so threads that need to log just call methods and pass the relevant data?
|
|
|
|
|
Hi
The website i am working on uses smartnav and has done without a problem for a while. However i recently had troubles with it not letting me debug so got a fresh copy from source safe (into the same directory structure as before) now when i try to add my web reference i get:
There was an error downloading 'http://127.0.0.1/aspnet_client/system_web/1_1_4322/SmartNav.htm'.
The request failed with HTTP status 404: Object Not Found.
I understand why this is happening (smartnav.htm is not in this destination - it is infact in wwwroot - then the above directory structure).
My question is does any one know why my project is looking in the wrong directory or is it the right directory and smartnav actually is not where it should be - if so any chance of a shove in the right direction.
Any help would be much appreciated.
Cheers
Dan.
|
|
|
|
|
I developed a web service on my local workstation in ASP.NET that inserts data into an accounting package (Visual Studio 2005). It uses an API provided by the vendor. I installed the accounting software on my machine and was able to successfully build the web service. Creating the reference to the Accounting software did create 2 interop references.
Now comes the problem
I have to deploy this to a production machine. The accounting software is deployed on this machine as well, but the person that installed it deployed it using a UNC name instead of installing it to a fixed location (ie its installed to \\Fileserver\ACCPAC instead of c:\ACCPAC) - because this app will be shared by multiple users.
My webservice deploys OK, but cannot find and initialize the class it needs to do the work. I keep getting the following error:
*********
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
StackTrace: at AccpacCOMAPI.AccpacSessionClass.Init(String ObjectHandle, String AppID, String ProgramName, String AppVersion)
*************
I have picked the process apart and the only thing I find different is that the DLLs are registered differently, mine to C:\ACCPAC, and the production servers to \\Filerserver\ACCPAC
Has anyone run into this problem. I am stumped and out of ideas....
Thanks in advance for any assistance
|
|
|
|
|
hi all,
i have a header file where all values are stored as byte..
i have to convert the byte to float value..that byte is a hexadecimal number.
i tried Convert.ToSingle and got 2.072774E+09 as output.
is that correct?is there any other method for byte to float conversion.
Thanks in Advance,
sunita
|
|
|
|
|
Dear All,
i have a datagrid control with 3 columns. the first column is a template column with radio buttons. to keep the Column width fixed i added the attributes "TABLE-LAYOUT: fixed ; OVERFLOW:hidden". It is woking fin. But the problem is that the radio button column also have the same size as the remaining and it is not looking good.Can i keep the radio button column to a fixed width? at the same time i want that the cell data should be clipped if it exceeds the cell width.
ThanX in advance
Ramesh.Kanjinghat
|
|
|
|
|
you can actually word wrap the text rather than cutting it off
|
|
|
|
|
Well. Wrapping requires that the text has spaces embeded. Even it works it will increase the cell height. Actually i am providing tool tip to display the text clipped.
Ramesh.Kanjinghat
|
|
|
|
|
Yes u can give width of each column in pixels and in percentages at the design time.
Do good and have good.
|
|
|
|
|
ThanQ for the reply. I have tried that way too. but when i do so. the column with cell that have data exceeding the limit is getting enlarged as long as the data.
Ramesh.Kanjinghat
|
|
|
|
|
Hi friends,
I got the work around for the above said problem. As i am setting the property TABLE-LAYOUT:fixed, the property will be apllied at client side. So we have to set the width of the columns using css class only. Below sample will help you understand the same.
<code>DataGrid1.Attributes.Add("style","TABLE-LAYOUT: fixed; OVERFLOW: hidden");</code>
The above code will force the grid to have eqaul column widths.
<code>DataGrid1.Columns[0].ItemStyle.CssClass="SetWidth"</code>
where SetWidth is given as below in the style tag
<style>
.SetWidth4Temps { WIDTH: 40px }
</style>
Hope this will help you all.
Cheers
Ramesh.Kanjinghat
|
|
|
|
|
i have 2 dates i want to get the difference between them
i have 3 dropdwonlist (day, month,year)
i get the values from it and concatenate them in one string in the format of day/month/year and i need to get the difference between the 2 dates to know which one is the recent one
thanks
|
|
|
|
|
use DateTime.Compare Method
For Example :
DateTime.Compare(DateTime.Parse("12/12/2005"), DateTime.Now) returns -1 indicating Later is greater.
DateTime.Compare(DateTime.Now , DateTime.Parse("12/12/2005") ) returns 1
indicating Former is greater.
DateTime.Compare( DateTime.Now, DateTime.Now) returns 0 indicating both are same.
|
|
|
|