SQL Server :: Access Data From A Custom Assembly

Feb 17, 2011

I need to access some data from a custom assembly. This custom assembly is used by an RDLC report in visual studio 2010. The report has its own data source but this is for a special condition. When I use ths code below the the text box on the report throws an error showing #ERROR. Its the database call that is causing the error as I have tested without the call. I have changed the connect string in the sample below to ans it shows the syntax.

View 3 Replies


Similar Messages:

Custom Server Controls :: Loading Same Assembly For The Multiple Times?

Jan 25, 2010

Can you tell me how it is better to load classes from the same assembly for multiple times? I will explain:

I have a usercontrol that loads the class from assembly A.DLL using (MyAbstractClass)Assembly.Load(path).CreateInstance(type) each time requested page loads. The control can appear on the page many times (about 20-30) and each of them can load the different type from A.DLL...so if control exists on page 20 times, 20 times (MyAbstractClass)Assembly.Load(path).CreateInstance(type)
has been executed.

The question is performance...

Does ASP.NET caches DLLs already loaded dynamically? After first (MyAbstractClass)Assembly.Load(path).CreateInstance(type)and first IO, will ASP.NET load A.DLL from cache on other executions ? Or I need to implement some kind of assemblies caching myself?

If I need to implement caching myself, what is the best and fastest way to do it?

View 1 Replies

Custom Server Controls :: How To Get All The Composite Controls Present In The Registered Assembly

Aug 17, 2010

I have created two composite controls in the same assembly and registered that assembly in a master page

using <%@
Register
tag.

When I try to use these controls using the registered tag prefix I am getting only one control along with the tagprefix .

How to get all the composite controls present in the registered assembly?

View 2 Replies

Custom Server Controls :: Registering Controls Of Current Assembly Object Reference Not Set Error

Aug 21, 2010

I have created a simple ASP.net Web Application (2.0) and have added a web user control.

Now in my page I have added this control but I have registered like this,

<%@ Register Assembly="WebApplication1" Namespace="WebApplication1" TagPrefix="Custom" %>

Which means I want to access all the controls in my current Web Application project

Then I have added my user control like this,

<Custom:MyUserControl ID="MyUserControl1" runat="server" PublicProperty="Hello" />

Every thing is fine but when I execute the project, NO control on my user control gets "instantiated" and thus I receive error "Object Reference Not Set"

Note that My Control has,

1) Public property PublicProperty as String

2) 1 Label control

In Load Event Handler I am setting Text property of Label Control to PublicProperty. Here object reference NOT set error occurs (which means Label control is NOT initialized).I don't want to register my control using Src, TagPrefix etc.

View 4 Replies

Security :: System.Data.SqlClient.SqlClientPermission Error - No Custom Assembly - Sys Admin

Aug 12, 2010

I've researched the System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. error.

So far all the suggestions indicate either a custom assembly that needs a permission change (I don't have any custom assemblies) or requires a setting change on the server (I'm not the admin). This is for a ReportViewer app using RDLC files. So my questions are: Are there any other things to try troubleshooting?

I'm a complete newb at attempting to understand (I don't) what I've read on this subject regarding the server admin part. What do I need to tell the server admin to check out and/or change? I've looked at the commonly referenced post on wss_mediumtrust.config (I have no idea what that is). Post link. But with no clue on what the post is talking about I don't know what to ask the admin for.

View 8 Replies

C# - Using Custom Httphandler From A Custom Assembly?

Feb 18, 2011

Is it possible to register a custom httphandler in a stand alone assembly? I'm writing a control toolkit that uses httphandlers to perform AJAX and I would like to make the use of the toolkit as low friction for the web developers as possible. There will be quite a few handlers and I dont want the developer to have to register them all in the web.config.

View 2 Replies

Custom Server Controls :: How To Access The Custom Controls In Web Project

Jul 22, 2010

I created one textbox custom control and i opened new asp.net web project. now i register my custom control in my web project.

Afterthat i can't able to access my custom control textbox and its not showing in my web project(not web application).

its working in my local machine, the same way i upload all the files to my remote server its not working.

Let me know , what mistake i have done and what way can i access my textbox controls in my web project.

through webproject how to get the custom controls values.

View 1 Replies

Custom Server Controls :: Custom Tag Not Found For Control / Error: Unknown Server Tag 'custom:AjaxValidator'

Jan 3, 2011

Hope this is the correct forum for this question. I am using VWD 2010 an have a web project and get the following error upon execution:

Parser Error Message: Unknown server tag 'custom:AjaxValidator'.

My code is as follows in the .cs file:

[Code]....
[Code]....

View 1 Replies

Recompile The Assembly To Use The New Mono Assembly Versions The Assembly Is Closed Source?

Feb 18, 2010

I have recently discovered that I am affected by this bug http://www.mail-archive.com/mono-bugs@lists.ximian.com/msg71515.html

Well,at http://www.mail-archive.com/mono-bugs@lists.ximian.com/msg71529.html they say the work around is to create a global policy assembly and redirect the assemblies that way since it is not read from the web.config.

How do you actually do what they describe there? There is a huge documentation gap in that area with Mono.Also,I can't just recompile the assembly to use the new Mono assembly versions because the assembly is closed source.(but it does work with Mono.)

View 1 Replies

Asp Don't Load Custom Actions Assembly

Feb 9, 2011

My setup project installs web site and executes some custom actions using a class library. That class library is copied to bin folder of the web site, and after that IIS tries to load it even though it isn't needed by the web site any how. How to prevent the class library from loading? Maybe it is possible to copy it to another directory instead of bin? Or maybe the web.config can be configured in such a way to prevent that class library from loading?

View 1 Replies

Passing A URL QueryString To A Custom Assembly?

Dec 21, 2010

I am trying to pass a URL Querystring to a custom assembly. How can I accomplish this. I need to store the querystring value into a parameter, but it has to be decrypted (This is what the custom Assembly does). I have tried to first put it into another parameter and then call that using=Code.MyClass.DecryptMe(Parameters!Eq.Value)But it doesn't get any value from the Eq parameter. how can I accomplish this?What is the best way to get the Querystring into the custom assembly

View 2 Replies

Custom Server Controls :: How To Access The Remove Button Event Of The Collection Editor Dialogue Box

Mar 25, 2010

how we can access the Remove button event of the Collection Editor dialogue box?

View 3 Replies

Custom Server Controls :: Access Multiple Header Rows Of The Gridview In Render Method?

Oct 22, 2010

I have extended a gridview to add an additional header with following two hyperlink controls "Select All" and "Clear All". These will operate on checkboxes in the data rows of the grid. I hide the column headers as I only want to show one column with checkboxes and "Select/Clear All" links. Everything is working as expected. Now, I wanted to add a scrollbar to my grid control, I did add the scroll bar using div but what it does is, it includes the "Select All and Clear All" links aswell. I only need to add the scrollbar to datarows and not to the header.I am trying to extend my control to include hte scrollbar by adding div during Render function. But how will I determine or loop through header rows? How will i get the header row with hyperlinks that I created above?? In Render if I do this.HeaderRow, it gets the original column header and not the custom header.

View 1 Replies

Custom Server Controls :: Why Custom Control Write Data Only One Time

Dec 26, 2010

I have built a custom control. when i add this custom control in my page twice or more then the it write only one time of its render contest data.

View 4 Replies

Configuration :: Registering Custom Controls From Assembly?

Mar 31, 2010

I'm having some difficulties registering a custom control from a class library in my webapplication's web.config file (or directly on a single page at all). These are the steps I've taken thus far:

1. I have a class library that generates a dll called "Core" and my webapplication has a reference to this "Core" assembly.

2. The Core class library contains a class called AjaxTable which is of namespace "Core.Presentation.DataViews".

3. AjaxTable extends System.Web.UI.Control.

4. I have added the following to my webapplication's web.config file.

<add assembly="Core" namespace="Core.Presentation.DataViews" tagPrefix="core" />

5. Since the previous didn't appear to work I tried the following variant:

<add assembly="Core" namespace="Core.Presentation.DataViews.AjaxTable" tagPrefix="core" />

It seems like I must be doing something small wrong or missing a step. Can anybody give me any advice? Thank you all in advance.

View 10 Replies

Forms Data Controls :: Custom Gridview / Insert The Custom Dropdown Button Using Server Control For Each Column?

Aug 18, 2010

i've created a webform with one gridview having connected with the database using datasource. i.e password database with three colomn .

now want to insert the custom dropdown button using server control for each column.

when i select the dropdown list the list should display the value as required.

e.g if i click the uname dropdownlist then it should show the list of names.

if i click on pwd dropdownlist then it should show the list of numbers.

if i select any one of the value in the dropdown list then it should insert into the

database.

can i get code on this type of question...?

View 3 Replies

Access ASP Rolesprovider From External Assembly

Jan 14, 2011

I have a RolesProvider properly registered and fuctioning. When the ASPX-page is executed I do some of the work in external assemblies (.dll-files referenced in, plain vanilla). I need to access methods on this role provider from the external assembly. How can I do that?

Note: I don't want to pass a reference from ASPX to the external class if possible. Something like "HttpContext.Current.Roles" would be great. Bonus: Shed some light on when and how is the custom ASP.Net RoleProvider used.

View 1 Replies

Configuration :: Register DLL To Access An Assembly?

Oct 18, 2010

The company whose program we are using developed an API that can be accessed from a web application as well. They provided us with a sample of an ASP.NET application which works fine. When I open the *. Sln file, and then the Default.aspx page (http://localhost:65250/Default.aspx) I don't have a problem using this DLL.

But, when I copy the codes on the server and I try to access the application via web directly, like http://servername/default.aspx, it is telling me that the assembly from this DLL is not registered.

I noticed that when I open this application through *. Sln file, I don't see the BIN folder, but a REFERENCE folder instead.

My question is: how can I register this DLL so I can use it via web directly?

View 1 Replies

Security :: Can't Deploy Custom MembershipProvider / RoleProvider Assembly To Website

Oct 15, 2010

I have written an assembly (DLL) containing two classes, MyMembershipProvider and MyRoleProvider, which are derived from MembershipProvider and RoleProvider, respectively. I have implemented most but not all of the abstract methods; the remaining ones all throw a NotImplementedException. I have signed the assembly and added a reference to it in my web-site project, where the relevant web.config sections look like this:

[Code]....

When I fire up the site, however, I get the following error:

Configuration Error

Description:
An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:
Exception has been thrown by the target of an invocation.

The error message points to the <add /> tag in the <roleManager /> section: if I take that out, however (enabled="false"), it comes back again as soon as I try to log-in to the site (this time pointing to the membership section). I have verified that is recognising the classes by changing the name in the "type" attribute (to something that doesn't exist), at which point it throws a different error. Therefore I'm presuming there's a problem with my assembly code somewhere; but how can I find out where? I have debug=true in the web.config and also compiled the assembly with Debug options, but no clues.

View 4 Replies

Configuration :: Access An Assembly With The Same Name But Having Different Versions At Runtime?

Feb 14, 2011

I have 2 assemblies with the same name but with different version 1.0.0.0 and 1.0.0.1. I have installed it in GAC and want to use 1 of these versions during run time from my C# application(for e.g - based on locale) in asp.net 2.0.

View 5 Replies

Visual Studio :: Signing Assembly Access Is Denied?

Jan 5, 2011

I've recently upgraded to WIndows 7. When I try to sing the assembly in VS2010 I get an "Access is denied" error. I am logged as admin so I'm puzzled. What service account does VS uses that I should elevate its privilages?

View 1 Replies

Web Forms :: Error In Web Form / Using A Custom User Control Which Is Compiled Into A Single Assembly

Apr 23, 2010

I am having a very hard time in consuming a very simple web user control that I have built using a Web Application project in VS 2010. The user control works fine as long as the consuming aspx page is in the same project. But after deploying the project using Web Deployment Project into a single assembly I am not able to use it correctly from another aspx page which is in a stand-alone project. The error I see is a null reference exception. Here are the steps that I am following:

1 Create a web user control named WebUserControl_Label using a web application project. This control works fine when used in an webform in the same project.

This is the ASCX of my user control :

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl_Label.ascx.cs" Inherits="TestWebAppWithCustomControl.WebUserControl_Label" ClassName="TestWebAppWithCustomControl.Controls" %>
<asp:Label ID="Label1" runat="server" ></asp:Label>

This is the code behind:

namespace TestWebAppWithCustomControl
{
public partial class WebUserControl_Label : System.Web.UI.UserControl
{
private string _labelText;
public string LabelText
{
set
{
Label1.Text = value;
}
get
{
return Label1.Text;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

2. Create a single assembly for the user control above using a Web Deployment project. The name of the assemby is TestWebAppWithCustomControl.

3. Create a webform in another web application project to use WebUserControl_Label user control. This project has TestWebAppWithCustomControl.dll added as a referemce.

This is how I am using the custom control above in an aspx page:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ConsumeTestWebAppUserControl._Default" %>
<%@ Register Assembly="TestWebAppWithCustomControl" Namespace="TestWebAppWithCustomControl" TagPrefix="GBS" %>
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<GBS:WebUserControl_Label Id="label1" runat="server" LabelText="This is custom label" />
</div>
</form>
</body>
</html>

The problem is that .NET throws a Null Reference Exception when its trying to set the label text via the LabelText property. It looks like that the label control that lives inside the WebUserControl_Label user control is not getting instantiated and is always null.

I have found a few articles online that talk about creating such distributable user controls using ASP.NET website projects. But if possible I would like to stick with the web application project because of the benefits it brings.

View 1 Replies

Custom Server Controls :: Video Tutorial Link For Composite And Rendered Custom Server Control?

Aug 20, 2010

i am new to technology so go easy on this post according to what i read from web there are 3 type of custom server controls 1 superclass2 composite 3 renderedi found video tutorial for superclass custom server control but couldnt find video tutials for other 2.lease forward me link for composite and rendered custom server controls video tutorial

View 1 Replies

Custom Server Controls :: Custom Server Control Rendering Method In Multiple Class?

May 17, 2010

I am creating custom server control. I have two classes in project. One is main class that render control and another will be used to render content based on condition.I just want to know how to render content from other classes in main class.For example. This isjust an example.My main class code

[Code]....

My TopLeftPane class

[Code]....

My page code on page load event

[Code]....

When I run the page, Header title always getting null. This is a just sample code. I will have more than 20 classes so I dont want to write a code in main class to render whole control.I hope all of you understand my problem.

View 3 Replies

Custom Server Controls :: TemplateField [TextBox] Binded To DataSource (Custom Server Control)?

Jul 28, 2010

Case : a templatefield Text Box created by class TemplateHandler and added to the composite

control Grid .how to bind it to the DataSource Object of the Grid Class ?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved