IronPython Dlls Generated With A DLRCachedCode Class Inside?
Feb 23, 2010when I compile some .py codefiles with no class definitions into dlls , the compiled dll is created with a "DRLCachedCode" class inside. Why is that?
View 1 Replieswhen I compile some .py codefiles with no class definitions into dlls , the compiled dll is created with a "DRLCachedCode" class inside. Why is that?
View 1 RepliesI've created a service (class library) that uses a few other class libraries within its solution.
When I try to use this service dll in a website the system requires me to also deploy all of the child dlls of the service to the website.
I'd like to combine the service dll and all of its child dlls into a single dll.
I found a reference to "ILLINK" on the web as a tool that's supposed to enable this.
Is there a tool built into the .NET framework that will do this? It seems like it would be a not-uncommon requirement.
I am having problems adding a reference to a custom assembly in my Bin folder within a controller class I am writing. I can see the dlls in the Bin folder of my Solution file and when adding a new 'using' block to the top of code page, its not picking up any of my assemblies as I try to spell them out.I tried just typing them in and building the solution, but I get errors, it just wont pick these up!
View 3 RepliesMy question is dealing with the DataList control. I am trying to add a click event to the rows of the "table" in the OnItemDataBound event.
The problem I'm having is I can't get a reference (through a row id attribute) to the "row" being generated by the DataList control (and more specifically the item template). Is there a way to add id attributes to the rows being generated by the item template?
Disclaimer: My experience/knowledge of web services is very limited.
There is an existing web service WSDL that I have reverse engineered with wsdl.exe to create a C# proxy class.
Using Visual Studio 2008 I created a default web service template.
How do I reference the generated proxy class so that it will work in the web service?
For example -> calling http://localhost/webservice/service.asmx?WSDL will return the details from the proxy class.
I'm new to this forum, Ok here is the problem. I tried to implement the user profile pattern that provided by ASP.Net 2.0, first I added this couple of tags to the web.config
<system.web>
<anonymousIdentification
enabled="true"/>
<profile>
<properties>
<add
name="Name"
allowAnonymous="true"/>
<add
name="Age"
allowAnonymous="true"
type="System.Int16"/>
<group
name="User">
<add
name="Category"
allowAnonymous="true"/>
<add
name="MemberSince"
allowAnonymous="true"
type="System.DateTime"/>
<group>
<properties>
<profile>
Then I buit the project and moved to the page code behind, the surpise is that I didn't have the Profile object in the intellisense.
Is there a method like IsValid(); in Entity Framework Generated classes?
Would I have to create a method like the above?
PS.
I would like the method to return a boolean.
i'm worried about doing this since my changes will be overwritten when the dbml file is auto generated again (as they often are).
i'm thinking of doing a partial class and writing out the same properties to annotate them, but worried that it will complain about duplicates, and the reason i can't even experiment brings me to the second part of my questions...
... that, the expandable arrow on my dbml file listing is missing, right clicking and selecting "View Code" just displays an empty partial class as below...
Partial Class FPDataContext
End Class
I'm using VS2010 RC and am just developing an MVC 2.0 app where i want to be able to use the UI Annotations such as [UIHint("RelativeDateTime")]
edit:
here is my VB version edit as an example...
Imports System.ComponentModel.DataAnnotations
<MetadataType(GetType(CommentMetaData))> _
Partial Public Class Comment
End Class
Public Class CommentMetaData
<UIHint("PostedSince")> _
Public Property DateAdded() As DateTime
End Class
I'm trying to implement my own Membership provider. I don't want to dig in very details but only high level logic. And first I don't understand is how can I use the class User generated from database in my CustomMembershipProvider project?
I thought I shouldn't generate class User in my project which uses my custom provider because it just don't need any users. It's only for login/logout functionality which implements Membership provider, not project that uses it.
Then I thought that I should pass Connection String to my Membership provider in order to make UserEntity somehow and use it inside Membership provider. I have two separate project for Membership provider and for any else project using Membership.
How could I create and use ADO.NET Entity in CustomMembershipProvider project for User table which located in database in other project?
When you add a Web Reference in an ASP.NET project in Visual Studio the web application's root namespace is always added.So, if I add a web reference called MyWebService and the default namespace of the application is MyApplication the namespace of the generated proxy class will be: MyApplication.MyWebService.
However, I want to be able to specify which namespace to use for the generated class (to skip the default namespace and have the namespace be called simply MyWebService).Is using wsdl.exe through the command line the only way of accomplishing this? I don't want to manually edit the generated class (since it can get re-generated).
Can anyone tell me how to show alert message inside the .cs file of class library project in c#? I am calling a method of cs file in classlibrary project. Whenever the control comes to the alert message statement inside the method, alert message should be shown on the web page(aspx) and the next statement to the alert message statement should not be executed.
View 3 RepliesI have a hyper link control and I set the NavigateURL and the ImageURL property at runtime. I also need to set the class of the image tag that it generates but I cannot figure out how I can do that. The solution mentioned here [URL] does not work because the image url is hard coded.
View 2 RepliesI searched the web and stackoverflow, but unfortunately, have not found any definite answers on whether or not Django is properly supported in IronPython.Net.
At work, I have some tools I would to develop in Django and Python, but from what I have read, Django is not really supported in IronPython.Net.
I'm trying to check dynamically generated "checkbox" value inside Listview.
I can reference non-dynamic checkboxes exact in same location (index) inside Listview using "e.Item.FindControl", however I can't reference dynamic checkboxes.
Here is my code.
[Code]...
I am very interesting in the dynamic language runtime of .net, and saw IronRuby/IronPython is built on top of it. I cannot find some example which utilize the dynamic of Ruby/Python from within c#, which is what I realy interested.
I saw videos from Microsoft which call JavaScript from within Silverlight using the dynamic of c# 4, just wondering how easy it is to call Ruby/Python in web/windows form? I know that Umbraco have a python implementation somewhere, and it is possible, but not sure how?
I want to select a particular item in a dropdownlist by value, in asp.net using IronPython.
I found I can do it like this
listItem = ddl.Items.FindByValue(x)
if listItem != None: listItem.Selected = True
But I want to do it in one line
I'm trying to get a CodeExpression from a string of python. It seems possible since some of the DLR docs mention CodeDom classes but I haven't been able to find any examples or better docs. Any insight or psuedocode appreciated...
FYI, the use case here is to make an Asp.Net ExpressionBuilder that can evaluate python to use in SharePoint 2010. Let me know if there's anything like this out there!
I need to convert this line of code from an asp.net c# page to asp.net IronPython, how would it be?
((IPostBackEventHandler)Button1).RaisePostBackEvent(null);
I'm trying to call ReportViewer.ServerReport.Render similar to what we did in VB.NET or C# this way,
exportBytes = ReportViewer1.ServerReport.Render("PDF",None,mimeType,encoding,fileNameExtension,streamids,
Warning)
But I'm getting this error "expected Reference,but found null"
do you know/have you tried any code protection system which works with IronPython assemblies? Can you list it/them here?
View 1 RepliesI have a class file called ShoppingCartClass.cs. Inside ShoppingCartClass I have a method called CanadaPostShipping.
CanadaPostShipping get passed a lot of variables and then builds an xml, sends it to CanadaPost url and gets back an xml file with the shipping rates.
I would like to pass the xml back to my webpage so in my web page I can check that it has status ok and then extract the information I need.
My testing calling routine looks like this:
[Code]....
The start of my CanadaPostShipping routine looks like this
[Code]....
This is my current ending spot in CanadaPostShipping....where I am getting back the correct xml from CanadaPost
[Code]....
As you can see I am saving it to my thumbdrive.....
What changes would I have to make to my calling routine and the method in the class to return xml "mydoc"?
I have the following code:
[Code]....
I would like the functionality of namespaces inside of a class, as in something that would let me call Step2.Execute() instead of having to put Step2_ in front of a whole bunch of functions. I don't want to have to create separate classes / modules for step1, step2, etc.
Is there a way that I can accomplish namespace functionality from inside a class?
One small doubt in the way it works for C#Where does local variables of a method inside a class get stored?Heap? - If yes, then why do we have to explicitly initiate them?Stack?- Then how does the allocation of them takes place once we make a object of the same class using new - would it make the member variables of class to be allocated on heap and local variables of member functions (of the same class) on stack.
View 4 RepliesI understand the problem of the static variable inside a class in the web application, now I try to create a simple class to deal with SQL Server for example, so I created Static Method inside this class, this static method used in insert, update and delete from database, I wonder if this is safe, and there is no problems will appear ?
View 10 RepliesHow do you reference an asp.net control on your page inside a function or a class.
private void PageLoad(object sender, EventArgs e)
{
//An example control from my page is txtUserName
ChangeText(ref txtUserName, "Hello World");
}
private void ChangeText(ref HtmlGenericControl control, string text)
{
control.InnerText = text;
}
Will this actually change the text of the txtUserName control?
I tried this and is working
private void PageLoad(object sender, EventArgs e)
{
ChangeText(txtUserName, "Hello World");
}
private void ChangeText(TextBox control, string text)
{
control.Text = text;
}