|
|
Hi everyone,
I had trouble getting a VB project into TFS because I'm a newbie and had the local and source control mappings and bindings misconfigured. On one check-in to TFS, my project ended up being split into several new folders within the parent folder.
I straightened out the mess and tried again only to discover that the bin file somehow got lost so, I copied the bin file from another project to my project and removed anything relevant to the other project.
Now I can't compile my project because of this error:
"The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located."
Obviously, I checked the bin file for this entry and it is there.
Internet isn't very helpful as I'm looking for a fix, not a work around.
Any help will be greatly appreciated.
Red.
|
|
|
|
|
Check you have the right version of the assembly (1.0.5.0 of (probably) Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll). Download a tool called "ILSpy", it lets you look at assemblies to see their versions and what classes etc are in them, it's pretty handy for debugging issues like this. Alas the "fix" is probably going to be to get the right assembly.
|
|
|
|
|
F-ES Sitecore,
It was suggested to me that I remove the compile section in the web.config file and let the system determine what to use.
Sure enough, there it was, in the web.config file and after commenting out the compile section, that particular error was never seen again.
Issue solved.
Thank you for your help eventhough it wasn't the solution.
|
|
|
|
|
so tell me how could i design whole things. suppose i have a registration class what has so many properties like
Account information
----------------------
First Name
Surname
Company Name
Contact Number
Email :
Password
Confirm Password
Billing information
----------------------
Address1
Address2
Town/City
County/State
PostCode
Billing Country
i have one customer class which has many properties for account and billing information. now i want when i will save customer data by EF then account info will be saved in customer table and billing info will be saved in address table. so tell me how could i do this mapping when i am working with EF db first and code first.
please discuss with a sample code. thanks
|
|
|
|
|
As you see in this example [^]
You should have relation between address table and billing table like a foreign key relation with billing table where primary key of that foreign key is defined in address table.
|
|
|
|
|
I have an aspx content page that is related to a .master file, which of course has a Form tag. I believe that the Form is getting resubmitted when the user clicks on the "Enable Flash" button in the Flash popup.
This occurs in Google Chrome (and NOT in IE or Firefox).
My question is, how to allow this popup to be clicked, essentially, to bypass the form resubmission?
|
|
|
|
|
Probably by changing the code for the popup, which we can't see because you haven't shared it with us.
But if this is a new development, you should avoid Flash if at all possible. You have less than three years until Adobe kill it:
Adobe will finally kill Flash in 2020 - The Verge[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
We are replacing our Flash but it's a massive project. Until then, I have to deal with it. The pop-up isn't my own (.NET code), it's called this way from the aspx:
<%@ Page Title="" Language="C#" MasterPageFile="~/App_Parts/Masters/Home/ParentFastTrack.master" AutoEventWireup="true" CodeFile="fastTrack.aspx.cs" Inherits="members_Home_fastTrack" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">
<script type="text/javascript" src="https://cdn.whizz.com/whizz-flash.min.js"></script>
<script>
Shadowbox.init({
skipSetup: true,
players: ['iframe'],
useSizzle: false,
overlayOpacity: 1,
viewportPadding: 5
});
So this https://cdn.whizz.com/whizz-flash.min.js is being called in another of my aspx pages and works there, but that one doesn't include a .master page, and subsequently no tag. My suspicion is, it's a issue.
Thanks for any help.
Anita
|
|
|
|
|
Looking at the full script file[^], it seems the popup creates a <button> element within the modal to open a new page with instructions on how to install Flash.
The event handler for the button doesn't prevent the default behaviour. Since the button is inside a form, the default behaviour in some browsers is to submit the form.
You'll need to find some way to identify the button, possibly via an ID or CSS class on an ancestor element. You'll then need to add a delegated event handler[^] for the button's "click" event, and call the preventDefault()[^] method on the event object.
For example:
document.getElementById("parent-element").addEventListener("click", function(e) {
if (e.target && e.target.nodeName == "BUTTON") {
e.preventDefault();
}
});
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
pls can i reference an iframe of one aspx.vb page inside another aspx.vb page?
if yes then pls help me out with the code behind.....thanks
|
|
|
|
|
The Web does not work that way. Pages are just classes that are instantiated and that generate html which is sent to the client. You can't access the page in VB because it does not actually exist.
What you can do is call methods or function in that class just the way you would any other class.
I think you need to define more clearly what and why you want to do this and there may be another way. JavaScript might be an option.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
No because iframes exist on the client, they are only accessible via code that runs on the client such as javascript. The code on your vb files runs on the server and has no knowledge of, or access to client iframes.
|
|
|
|
|
i am talking about asp.net mvc.
just seen a example but do not understand when people mention url with ajax begin form?
@using (Ajax.BeginForm(new AjaxOptions { Url = Url.Action("Foo", "Bar", null, "http") }))
{
...
}
when we need to post data to different controller and action then url is used?
if yes but ajax begin form has option where we can specify controller and action name then why should we generate url where form will be posted ?
The Ajax.BeginForm takes the following parameters
actionName
controllerName
routeValues
ajaxOptions
htmlAttributes
please help me to understand the url usage with ajax begin form. thanks
|
|
|
|
|
The URL option is used to to set a specific url to POST something to it. The URL option is there so you could specify a full string URL and not just an ASP.NET MVC Controller/Action format thing. So typically in ASP.NET MVC, you could just do:
@using (Ajax.BeginForm("YourAction", "YourController")
to POST to an MVC action. To POST to a URL specific route, you could do:
@using (Ajax.BeginForm(new AjaxOptions {
Url = "http://www.somedomain.com/foo"
}
|
|
|
|
|
i have editor which external user will use to create page. now wicked person can inject something malicious. so tell me how to prevent it?
i will allow user to upload any string data but how could i show it in page as a result html will display nicely but if there js code that will not be executed....just display html.
how to exclude script section from html data when displaying in page. thanks
|
|
|
|
|
Use something like AngleSharp[^] to parse the content, and strip out any tags or attributes that aren't explicitly allowed.
You'll probably also want to set up a Content Security Policy[^] to block inline scripts and third-party scripts that your site doesn't use.
NB: Some older browsers don't support CSP, so you can't solely rely on this to block XSS.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i read article from these links
http://www.dotnet-programming.com/post/2015/04/12/How-to-Handle-Cross-Site-Scripting-in-ASPNET-MVC-Application.aspx
https://www.codeguru.com/csharp/.net/net_asp/preventing-cross-site-scripting-attacks-in-asp.net-mvc-4.htm
they saying to use AntiXSS library. can i use in production? is it robus?
guide me. thanks
|
|
|
|
|
The AntiXSS library is robust and perfectly suitable for use in production.
However, that will completely encode the output. From your original post, it doesn't sound like that's what you're trying to do.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Please let me know the step which is created for an MVC project with angular 4 in vs 2013 or give any reference link
|
|
|
|
|
|
suppose i have a interface from where user insert data to database. database is running in USA pc. user may enter data from USA,UK,Germany and India. so their timezone is different.
so do i need to store date and time as utc format ?
how to send timezone info of user to sql server store procedure and in sql server store procedure convert utc date and time to supplied timezone?
how to capture user timezone id or name which i will use to convert utc date and time to specific user time timezone info ?
i need to develop a application which show data entered by user from different country and data will be stored in USA pc.
please guide me detail.
|
|
|
|
|
Never save timezone information when saving datetime information. Always store dates and times as UTC values. The timezone information is only needed at the user's PC, when converting between local time and UTC.
|
|
|
|
|
at client side how could i convert utcdatetime to local datetime? give me some link or hints.
|
|
|
|
|