C# - Sharing A Custom Datasource Between Winforms And Webforms?

May 5, 2010

I'd like to create a custom datasource that is shared between a Winforms and Webforms project. This functions as a middle layer for a reporting tool(DevExpress Reporting). The Webforms project is a designer for these reports. So we want for the reports to be capable of going to the server to get data and such. So our datasource would abstract away all the communication overhead. Then, for consistency, the datasource would also run on the server for reporting, except for their would be no communication.

What would be the best course of action? There doesn't seem to be such a thing as a DataSource in Winforms. Is DataSource not the thing I'm looking for?

Edit: After some research, it appears that IDataAdapter may be good for my purpose. Any opinion on that?

View 1 Replies


Similar Messages:

Security :: Custom Role Provider In WinForms And Web Application?

Feb 9, 2010

I have a custom role provider class that is currently being used by a web application. We are now in the process of migrating several windows applications from VB6 to VB.Net. From preliminary research, I understand that I can use the custom role provider in win forms as well and came across Client Application Services. I understand how the Client Application Services is setup, but can't seem to find how the custom role provider code will be shared between the web apps and the windows apps.

View 3 Replies

MVC Alongside WebForms With Custom HttpHandlers?

Dec 20, 2010

I am researching phasing MVC into our WebForms site. The caveat is that we already have our own SEO mechanism for mapping/rewriting URLs via an httpHandler. So in the web.config:

[Code]....

Now my existing URL mapping code is not called, so a request like "http://mySite/sally/admin.aspx" throws a 404 when it should be rewriting the URL as "http://mySite/admin.aspx?userId=2". I found that all is well until I call routes.MapRoute...it seems that is the point where MVC takes over for all requests, even though I have code to explicitly ignore requests for "*.aspx".

View 2 Replies

Web Forms :: Custom Profiles With .net 3.5 WebForms

Aug 2, 2010

I created tables in my database for managing a user's profile.I have the user table (username, password, passwordSalt, etc.) report (1 to 1) with a table ProfiloUser (idprofilouser, iduser, name, sex, DoB, email, etc.), the latter table reports (1 to 1) with the table ProfiloAzienda (idprofilouser, idprofiloutente)
and finally I have another table that is related profilodestinazioni (1 to many) with the table profilouser.

how I can create a custom profile is on web.config, which side code.I've created this in web.config:

[Code]....

The code then I created the following classes
[Code]....

View 5 Replies

How To Use Facebook Sharing And Tweet Sharing Tools

Dec 1, 2010

I see on the bottom of blog pages a sharing buttons (Twitter and Facebook), where if clicked the link behind (which is normally the blog page url) the fshare button takes the clicker to the blog site facebook page respectively.

How does one do this in asp.net 2 , does one one use the <%# %> in the url part of these share buttons, are there any examples of how this is done?

View 8 Replies

Security :: Custom Webforms Authentication - Looking For A Basic Example

Jul 19, 2010

I'm looking to implement my own basic webforms authentication. I don't want to use the 'membership' features in this case because I don't want to modify the database schema with all the membership elements that I won't use, and I don't need to support users across multiple applications. I want to wind up with one simple 'users' table that has username, password, passwordSalt, and several other fields to support custom user attributes specific to this application.

I was looking at this:

http://www.xoc.net/works/tips/forms-authentication.asp

but it's rather dated... is this still valid? I'm looking for guidance on what I need to do to implement a custom webforms auth solution. A very basic skeleton I can expand upon, or a good tutorial/guide that illustrates the necessary parts... just the basics..

View 5 Replies

Custom Server Controls :: Need Custom Text Box Control With DataSource,TableName,ColumnName Property?

Nov 26, 2010

I need to create one custom text box control which should be bind with data base.

I am referring following link...

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.databoundcontrol.aspx

I used DataBoundControl to create my control but i am not able to do it properly.

public class SimpleTextBoxControl : DataBoundControl
{
private TextBox nameTextBox;
public string DataTextField
{
get
{
object o = ViewState["DataTextField"];
return ((o == null) ? string.Empty : (string)o);
}
set
{
ViewState["DataTextField"] = value;
}
}
[
Bindable(true),
Category("Data"),
DefaultValue(""),
Description("The text to display on the link."),
Localizable(true),
PersistenceMode(PersistenceMode.InnerDefaultProperty)
]
public virtual string DataTexValue
{
get
{
string s = (string)ViewState["Text"];
return (s == null) ? String.Empty : s;
}
set
{
ViewState["Text"] = value;
}
}
protected override void PerformDataBinding(IEnumerable retrievedData)
{
if (retrievedData == null)
return;
base.PerformDataBinding(retrievedData);
Controls.Clear();
nameTextBox = new TextBox { ID = "nameTextBox" };
foreach (object dataItem in retrievedData)
{
if (DataTextField.Length > 0)
{
nameTextBox.Text = DataBinder.GetPropertyValue(dataItem, DataTextField, null);
}
DataTexValue = nameTextBox.Text;
}
this.Controls.Add(nameTextBox);
}
}

View 1 Replies

Custom Server Controls :: How To Create Custom Property (DataSource) In Custom Controls

May 15, 2010

I know that how to create custom control and add custom property.

I want to create property like DataSource to my custom control.

View 1 Replies

Custom DataSource Extender - Where To Grab The Output Data Of The DataSource

Jun 9, 2010

I dream of creating a control which works something like this:

<asp:SqlDataSource
id="dsFoo"
runat="server"
ConnectionString="<%$ ConnectionStrings:conn %>"
SelectCommandType="StoredProcedure"
SelectCommand="cmd_foo">
</asp:SqlDataSource>
<Custom:DataViewSource
id="dvFoo"
runat="server"
rowfilter="colid > 10"
datasourceid="dsFoo">
</Custom:DataViewSource>

I can accomplish the same thing in the code behind by executing cmd_foo, loading the results into a DataTable, then loading them into a DataView with a RowFilter. The goal would be to have multiple DataViews for one DataSource with whatever special filters I wish to apply to the select portion of the DataSource. I could imagine extending this to be more powerful. I tried peaking at this and this but am a bit confused on a few points. Currently, my main issue is being unsure where to grab the output data of the DataSource so I can stick it into a DataTable.

View 1 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

Winforms - Why Is There A Databind() For Gridview

Mar 5, 2010

Why is there a need to explicitly call GridView.DataBind() to render the gridview. Why wouldn't it render by itself automatically like how it happens in Window Forms?

View 2 Replies

C# - Using .net Credentials To Log In From A WinForms Application

Aug 9, 2010

We have an ASP.net application but some screens are deemed too slow to use by our users.As a result, we are trying to provide a WinForms-based alternative to those data-input centric screens so we can use richer controls like Grids with immediate screen updates and feedback for the user.

Ideally, I would like the users to login to the WinForms application using the same credentials they use in the ASP.net application?

Is it possible?I've found this post ( http://stackoverflow.com/questions/1172069/net-authentication-for-both-web-and-winforms ) but it isn't really answering the question from my point of view... We are not using WebServices, or WCF at the moment and do not plan to use it unless it is really the only way to achieve this.

View 2 Replies

3rd-party UI Libraries For WinForms, WPF, MVC, Etc. Are Best?

Jan 1, 2010

I work with many diverse technologies, and don't possess the time to evaluate every single UI framework, so I'd appreciate hearing other coders' experiences with various frameworks.

The stuff I've worked with so far (and my perceptions):

WinForms: DevExpress (love the looks, hate the API and bloat), Krypton (free!, looks good, but limited), Telerik (don't like the looks)WPF: have only used WPF Themes pack. Asp.Net: Telerik MVC Controls (love it), jQuery UI (looks great)

View 1 Replies

S#arp Applicable In Classic Asp Or Even WinForms?

Feb 7, 2010

I know S#arp architecture is built for ASP.NET MVC. But I'm wondering if it can be used in classic ASP.NET (WebForms) or even desktop applications like WinForms or WPF.

View 3 Replies

Web Forms :: Using Winforms Control In Web App?

Aug 10, 2010

I need to know whether there will be any problem using win forms control as a custom control in my web app. Problems can be anything related to display, environment where the site is run.

Reason for using is I am not getting the treeview events in web which are there in win app. I need to implement drag drop of treeview nodes to a listbox.

View 2 Replies

Possible To Re-use Master Page From A Winforms App In A New MVC Im Implementing

Aug 9, 2010

We have an app with standard ASP.net forms. I would like to use MVC and I just wondered is it possible to re-use a master page from my main site?

View 3 Replies

How To Add A Winforms Usercontrol In An Aspx Page

Jun 29, 2010

How can we add a winforms user control in an aspx page?

View 3 Replies

C# - Url Routing And Winforms Not Working After Publishing?

Jul 5, 2010

my application not working when I publish (only files needed to run this application) it to the server. I set wildcard mapping in IIS. I'm getting the error below:

HTTP Error 404.4 - Not Found

The resource you are looking for does not have a handler associated with it.

View 2 Replies

Gridview Rowdatabound Event In Winforms?

Dec 12, 2010

in asp.net we can handle the RowDataBound event of the GridView control. this event fires when every row is added to the gridview.

i want to be able to handle this event in the gridview in a winforms application but i cannot find a similar event. my question is what is the event name that allows me to do the same as RowDataBound in asp.net?

View 1 Replies

C# - Create Panel Like Windows In WinForms?

Oct 10, 2010

[URL]

How can i create a window that holds Patient data in it? The 2 records that you see is in List View. I would then using ContextMenuStrip for text "View Details". When View Details is clicked i need to show the context. For web development this could be done via Javascript,div and panels. How that should be WinForms?

View 2 Replies

.net - Finding Control In Winforms Panel?

Jun 3, 2010

I need to find a child control in a winforms panel. I was wondering if there is a method similar to Panel.FindControl() of the asp.net webforms panel in the .net winforms version

View 1 Replies

Winforms - JQuery UI Datepicker / Doesn't Work

Sep 6, 2010

Given:

<input id="datepicker" type="text" />

Where the id = datepicker tells the javascript to attach all the datepicker code to the form element, how do I turn this into a server control?

For example:

<input runat="server" id="datepicker" type="text" />


Doesn't work because ASP.net generates it's own ID's.

Edit

<asp:TextBox runat="server" ID="dateTo" class="datepicker"></asp:TextBox>

Renders as

<input name="ctl00$mainContent$dateTo" type="text" id="ctl00_mainContent_dateTo" class="datepicker" />

And doesn't work!

View 3 Replies

Determine Whether Running In WinForms/console Without System.Web?

Mar 28, 2011

From a class library, I need to determine at run-time whether I'm running in an ASP.NET app or a WinForms/console app. There have been several other questions asked on the subject, but all of those solutions require adding a reference to System.Web. If at all possible, when running my console and WinForms apps, I don't want to load the System.Web assembly into memory just for one line of code out of thousands.

View 4 Replies

Winforms - Click Event For A Grid View?

Jan 13, 2011

In windows C# data grid view , I use cell click event and what i have to use for asp.net c# grid view ?

View 2 Replies

Gotchas Of Moving From Developing .NET To Winforms Apps?

Jun 5, 2010

After developing ASP.NET apps exclusively for several years I'm about to start developing Winforms apps. What are the gotchas that I should be looking out for with this changes? For instance the way object lifetime is managed in the winforms paradigm. I'm sure there must be plenty of gotchas / differences between the two that I need to be mindful of.

View 2 Replies







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