I want to compare the strings. Its about Disambiguate Doctors profile... If there are four or five members having same name i have to check whether they are same person or not ... If i have smith for five times in my table then i have to check all the five persons like,by having their lastname as comman. check attached form.
When attempting to place controls in different content areas using Masterpages and trying to use a compare validator, I get the error: Unable to find control id 'txtStartDate' referenced by the 'ControlToCompare' property of 'cvlDate'. I have also attempted to set it within the c# code behind in page load: cvlDate.ControlToCompare = txtStartDate.ID and by using findControl there must be an easy way to achieve this?
I am trying to check for a condition such that a date in an input control (textbox) is not greater from a date 1 years from current date(exactly) and also it should not be less than a date 1 year back from current date. for eg. if today's date is "21/dec/1990" then usen cannot enter a date in textbox which is less than 21/dec/89 and it should not be greater than 21/dec/1991. for this i first tried to confirm the greater than condition, i wrote the following code:
I need to post an xml string to another website. I can't create an xml file, because some of the content is dynamically created. The two lines that are causing me problems are
The conversion from double quotes to single quotes isn't being accepted. So how can I send the string so that the versions are surrounded by double quotes?
I have an assembly called like X.Common.DLL. There is some resources files for multilanguage app. Let's say it Language.resx Language.en-US.resx....etc.... I have a web application which contains this above dll as reference... So how can I use this resources file in my web applications markup side?
Text="<%$ Resources:Class, ResourceKey %>" is not valid because of "Class" name is in another assembly...
I'm just getting started using Resharper with VS-2008, and one of the 'errors' it gave me was to localize a Label's text in the code-behind. I've worked with Localization before to Localize a website from english into french, but I don't understand what the benefit is to localizing beside that usage.
I can get the current value of a URL query string by using Request.QueryString["UrlKey"], but can I actually modify the URL with code, without doing a form GET submission?
If the user is landing on the page for the first time, what is the easiest way to programmatically create the ?UrlKey=value through the Page_load method? Or am I better of doing this with Javascript or building a redirect Like: string redirect = "www.mysite.com?" + MyKey + "=" + MyValue;
So, I've got an array, filled with data from dynamic input fields. the input fields are PIN, Name and Description... and the user can add as many "sets" of these three fields as they want.
This data goes into an array.
For example, the array may have 11111, Test Name, Test Company 22222, Second Name, Second Company
etc. etc.
I know I can see the values of my array, so if I were to take: item(0) & ", " & item(1) & ", " & item(2)
my output would be: 11111, Test Name, Test Company
The problem I'm having, is, I need to write ALL of the groupings of three out to a file... and I'm stuck on how to do that. So, I need a way to loop through until the end of the array and get:
I'm new to .NET and converting and proper way to convert strings to other values. Specifically, here is a situation I'm facing:
I'm returning two values from a datasource as strings. One values is a representation of a span of time, and another is a count of how many attempts to access a system took place within the span of time.
Given these parameters (for example):
Span of time: 00:01:00 Attempts: 13
I'd like to calculate a third value that shows how many seconds each attempt to connect took place during that span of time. This involves converting the time span to seconds and then dividing by attempts. Where I am getting lost is with the conversion of types. I know the span of time needs to be converted to a date, reduced to seconds, then converted to a number to be divided by the attempts field, also converted to a number.
I've been playing around with code segments like this all morning to no avail:
VBNET Code: Dim thisTime As String = "00:01:00" Dim thisAttempts As String = "13" Label1.Text = thisTime Label2.Text = thisAttempts Label3.Text = Math.Round(Integer.Parse(Convert.ToDateTime(Label1.Text)) / Integer.Parse(Label2.Text), 2)
i want define connectionSreing in the web.config and then use it for DataContext ConnectionString. i do that : 1. i creat a class in App_Code :(MisaghDB is my database)
partial class MisaghDataContext { partial void OnCreated() { this.Connection.ConnectionString = ConfigurationManager.ConnectionStrings["MisaghDBConnectionString"].ConnectionString; } // or public partial class MisaghDataContext { public MisaghDataContext() : base (ConfigurationManager.ConnectionStrings["MisaghDBConnectionString"].ConnectionString) { OnCreated(); } } }
2. Add the connection string to my web.config file:
3. Right click on the DBML file design surface and chose properties. Select "none" for the Connection property.now should i change DBML file designer.cs (Misagh.designer.cs) ? The code should I delete in this file(DBMLfile designer.cs)? this is a part of my DBMLfile designer.cs :
[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="MisaghDB")] public partial class MisaghDataContext : System.Data.Linq.DataContext { private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); public NorthwindDataContext() : base(global::WindowsFormsApplication2.Properties.Settings.Default.NorthwindConnectionString, mappingSource) { OnCreated(); } public NorthwindDataContext(string connection) : base(connection, mappingSource) { OnCreated(); } public NorthwindDataContext(System.Data.IDbConnection connection) : base(connection, mappingSource) { OnCreated(); } public NorthwindDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : base(connection, mappingSource) { OnCreated(); } public NorthwindDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : base(connection, mappingSource) { OnCreated(); } ............}
I have a C# web service where I need to access a MS SQL DB. I see a way of creating a connection string in IIS and using it in the web application when connecting to the DB. In IIS in Connection strings you specify the name of the connection, server, user n pwd How can I use the name of connection string created in IIS in my c# app.? I am currently using
CustomerInfo customerinfo = new CustomerInfo(); // to return using (SqlConnection connection = new SqlConnection("server=servername; initial Catalog=eostartest; Integrated Security=SSPI")) {...
But I would like to use the name of the connection string created in IIS Connection Strings manager. Do I have to add something in the web.config as well?
In IIS 7 you can create database connection strings. I suppose this must be encrypted and best protected by IIS. This is nice, but how do I access it programmatically?
... nothing is displayed. However, outside of the <% %> tags (ie in the HTML) displays correctly.
I have no trouble displaying the usual alphanumerics, it's just the sign that is proving problematic. The underlying file is in Windows 1252 encoding, and I need to serve it as such. If I save the file as UTF-8, I get mojibake instead of a .
what I can do to make this work, or any settings that might be preventing it from working (other than saving the file in a different format)?
I am currently writing a small templating system in ASP.NET to allow users to add content. For example, the user can enter the string (variable type is string).
topHeader[x] = "They think it's all over. It is now!";
However, one change that's needed is the ability to add some basic HTML tags within this content, so the following can be done
topHeader[x] = "They think it's all over. <strong>It is now!</strong>" or
topHeader[x] = "They think it's all over. <a title="Football News" href="URL">It is now!</a>";
If you add such things into strings now they are not formatted as HTML, but I want to somehow escape them so that they can be. Naturally I've looked on the Internet for the answer, but as Razor is fairly new there's not much out there to help me out.
I have alot of query strings on one of my seartch pages. The problem is that even if the corsponding setting is not set by the enduser it will be visible in the URL. Is there a way to avoid this?
In this case the Controller actions take an object of the following class :
[Code]....
Is it possible to avoid setting all the values in the URL when it is the default values that are used?