|
|
Hey experts,
I've got a CustomValidator wrapped inside a repeater, which is wrapped inside an if condition.
When the condition is not met the code is not generated (I verified it using the browser's view source screen).
However, the server function which validates the TextBox fires anyway, and it shouldn't.
I realize that the following is a very simplified code, but I figure there's a concept I'm not aware of.
Please advice...
<% if (...)
{
%>
<asp:Repeater.....>
<ItemTemplate>
<tr align="center">
<asp:TextBox ID="txtStartTime" ></asp:TextBox>
<asp:CustomValidator ID="startTimeValidator" runat="server" ControlToValidate="txtStartTime" Display="None" ClientValidationFunction="ValidateStartTime" OnServerValidate="txtStartTime_ServerValidate" ValidateEmptyText="True"></asp:CustomValidator>
</tr>
</ItemTemplate>
</asp:Repeater>
<% } %>
|
|
|
|
|
why we use Interface for developing a consistently changes system?
Generally we uses Interface for multiple inheritance. We can Implement multiple interface in same time from a class. In Interface We declare a method and define that method in our class.
In general, we use Interface for developing a consistently changes system.
My question is, why we use Interface for developing a consistently changes system? Is there any advantage? if yes then please tell me .
In constantly changing system if we add a new method in interface the we have must define it in child class of that interface. this is too much laborious.so what are advantages?
|
|
|
|
|
First of all we will not use interface only for multiple inheritance support. Mainly Interface represent a service contract. One of more classes can implement that contract. One of the main advantage of Interface is code abstraction. You can isolate your code implementation details and client who use the code depends on the interface not the actual code. The benefit of this approach is when any implementation policy change then client will not affected. Another benefit is run time you can switch implementation if you write interface based program. Strategy design pattern is an example. Unit testing, Interface play very important role. if you properly write and run unit test then you need to create mock object. Without Interface you can not create mock object and with out mock object you can not test your code with proper isolation.
|
|
|
|
|
IN C#, there is no multiple inheritance.
Interfaces provide additional flexibility with inversion of control and dependency injection.
|
|
|
|
|
I'm converting an MVC4 site to MVC5. Anytime I try to name a View with a . I get a messagebox saying it contains invalid characters. I've Googled it to no avail.
ContactUs.cshtml
ContactUs.Mobile.cshtml
So, I assume ContactUs.Mobile.cshtml will have to be renamed? Thanks!
|
|
|
|
|
Have you tried to rename the file in the explorer and include it in the project again??
|
|
|
|
|
Been trying to use a non-default theme in a OOB MVC4 application (from the VS MVC4 template, no other modifications at all). I've been trying the "le-frog" theme from jqueryui.com[^].
Modified the "BundleConfig.cs" as suggested to include the line below (file exists at specified location and can be accessed over the webbrowser)
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/jquery-ui-1.9.2.custom/css/south-street/jquery-ui-1.9.2.custom.css"));
The page loads without applying any CSS, even though I can see the stylesheet with "view source";
<link href="/Content/jquery-ui-1.9.2.custom/css/south-street/jquery-ui-1.9.2.custom.css" rel="stylesheet"/>
I'm looking for an easy way to switch themes, any alternative solutions to the default theming-structures would be welcome too.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I found this[^] and it might be useful to you. This allows you to switch themes via the web.config file. Not 100% dynamic, but should at least give you some options to explore.
|
|
|
|
|
Thanks ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
from a web apps I need to open a new email in outlook with HTML body without using Interop service in references
is this possible?
|
|
|
|
|
Use a mailto link: <href="mailto:John.Doe@somewhere.com?subject=SPAM">
It is possible to add subject, cc, bcc, and some standard text.
|
|
|
|
|
I need to have HTML body and when I try Encode with HTML it didn't worked
|
|
|
|
|
You can't do it:
The special hname "body" indicates that the associated hvalue is the body of the message. The "body" hname should contain the content for the first text/plain body part of the message. The mailto URL is primarily intended for generation of short text messages that are actually the content of automatic processing (such as "subscribe" messages for mailing lists), not general MIME bodies.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
whats my option? I can't install outlook on a web server...
|
|
|
|
|
Installing Outlook on the server wouldn't help anyway, since you're trying to open an email message on the client.
There is no way to open an email message on the client pre-populated with an HTML body. You can only pre-populate the message with a plain-text body.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi All,
I am trying to list installed programs in client machine using ASP.NET
But it showing only server programs not client
This code working on VB.NET (.exe)
I want to develop a web page
Kindly guide.
Code :
Dim Software As String = Nothing
''The registry key:
Dim SoftwareKey As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
Using rk As RegistryKey = Registry.LocalMachine.OpenSubKey(SoftwareKey)
'Let's go through the registry keys and get the info we need:
For Each skName As String In rk.GetSubKeyNames()
Using sk As RegistryKey = rk.OpenSubKey(skName)
Try
'If the key has value, continue, if not, skip it:
If Not (sk.GetValue("DisplayName") Is Nothing) Then
'Is the install location known?
If sk.GetValue("InstallLocation") Is Nothing Then
Software += sk.GetValue("DisplayName") & " - Install path not known" & vbLf
Else
'Nope, not here.
Software += (sk.GetValue("DisplayName") & " - ") + sk.GetValue("InstallLocation") & vbLf
Label1.Text = Software
'Yes, here it is...
End If
End If
Catch ex As Exception
End Try
End Using
Next
End Using
Kirthi
|
|
|
|
|
Web pages are not allowed access to client information like this unless you get the user to download a program which will run on their system. Not many users are likely to allow it.
Veni, vidi, abiit domum
|
|
|
|
|
Thanks for the reply.
The below code which i pasted it is showing my local computer list (web page hosted)
So i tried to get remote location but not working.
Kirthi
|
|
|
|
|
Did you actually read my response? You cannot access the client's registry from code in a web page; it would make the client system vulnerable to all sorts of abuse, viruses, worms etc.
Veni, vidi, abiit domum
|
|
|
|
|
I am not 100% sure but i think You can't do this with ASP.NET, which runs on the server. You need to create an application that is installed and runs on the client machine. It could perhaps collect the information and post it to your site using web services.
|
|
|
|
|
Thanks for the reply.
Kirthi
|
|
|
|
|
plz help me ..
how to develop asp.net web application, connecting to mysql database.
i searched the google for developing asp.net web application .but it's giving membership, profile,role provider.
what r those ,they r must.plz. help me.
|
|
|
|
|
First off don't use txt speak in the forum it is frowned upon.
Secondly, there are 100's of tutorials out there some, probably most will lead you through getting user credentials to access the system. If you do not understand what they are then buy a book on software development or give up now.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Member 10263519 wrote: i searched the google for developing asp.net web application And you didn't find www.asp.net[^]?
Veni, vidi, abiit domum
|
|
|
|