.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Clr-AddIns saving addin settings

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :.NET Framework
 
Hi, I am loading a UIElement from an addin which is used as the AddIns settings interface: private void Settings_Click(object sender, RoutedEventArgs e) { SettingsWindow sw = new SettingsWindow(); FrameworkElement settingsUI = null; this.Dispatcher.Invoke((Action)delegate() { settingsUI = SelectedAddIn.PopulateSettingsIU(); }); sw.rootGrid.Children.Clear(); if (settingsUI != null) sw.rootGrid.Children.Add(settingsUI); sw.ShowDialog(); } This loads a UIElement that consists of the following: <UserControl x:Class="PakBusIPAddin.PakBusIPSettingsDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:settings="clr-namespace:TestAddin.Properties" Height="400" Width="400" Unloaded="UserControl_Unloaded"> <StackPanel> <Label Content="This is a test dialog for the PakBus IP Settings"/> <GroupBox Header="NL100 Settings"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height=&


View Complete Post


More Related Resource Links

Clr-AddIns saving addin settings

  
Hi, I am loading a UIElement from an addin which is used as the AddIns settings interface: private void Settings_Click(object sender, RoutedEventArgs e) { SettingsWindow sw = new SettingsWindow(); FrameworkElement settingsUI = null; this.Dispatcher.Invoke((Action)delegate() { settingsUI = SelectedAddIn.PopulateSettingsIU(); }); sw.rootGrid.Children.Clear(); if (settingsUI != null) sw.rootGrid.Children.Add(settingsUI); sw.ShowDialog(); } This loads a UIElement that consists of the following: <UserControl x:Class="PakBusIPAddin.PakBusIPSettingsDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:settings="clr-namespace:TestAddin.Properties" Height="400" Width="400" Unloaded="UserControl_Unloaded"> <StackPanel> <Label Content="This is a test dialog for the PakBus IP Settings"/> <GroupBox Header="NL100 Settings"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height=&

System.AddIn, simultaneous multitouch interaction in multiple addins

  
Hello, I have built an application that is able to load several addins, each having their own process, each sending their own UI onto the application's UI. I now would like to enable simultaneous multitouch interaction in any of these AddIns' UIs. The problem is: when there is multitouch interaction ongoing in one of the addins' UI, the others do not seem to receive any event, even though I try to touch controls in them. My question is: is this even possible in the current form of the framework? Or does the input device (i.e. my touch screen) get somehow "captured" by the currently manipulated UI's process, thus preventing the others from getting any input at all? Antoine

Convert English to Arabic number without changing any regional settings in .net

  
Well, most applications that I worked with was multilingual that supports English UI and Arabic UI.

And one of the major issue that we have faced is displaying Arabic numbers without the need of changing the regional settings of the PC.

So the code below will help you to display Arabic number without changing any regional settings.

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or

  
The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or pasting into an application. 2D versions are also available:

Does this look correct for saving a file/ new record to a database

  

So thank you for all your help so far, So I think i got this right,
but would like for you all to look it over to see if there is any
areas I might run into trouble with:

//using asp.net mvc 2
the table (sql server 2005, using entities framework)
"Pattern_Media"
table fields
"Pattern_Media_GUID  uniqueid 
"Pattern_GUID  uniqueid
"Media varbinary(max)  
"height int
"Width int
"Media_Type String (50)


the form:
<h2> Add Media to this pattern</h2>
<% Html.EnableClientValidation(); %>
<% Html.BeginForm("AddMedia", "Pattern", new { id= Model.Pattern_Guid} , FormMethod.Post, new {enctype = "multipart/form-data"}); %>
   
    <%: Html.Label("height") %>
    <%: Html.TextBox("height") %>

    <%: Html.Label("width") %>
    <%: Html.TextBox("width") %>

    <%: Html.Label("Media") %>
    <input type="file" id="Media" name="Media" />
   
    <input type="submit" name=

validateRequest appears to be kicking in in MVC RC1 despite settings

  
After upgrading a project to the RC a System.Web.HttpRequestValidationException is thrown when posting a value containing HTML from a TextArea. I have checked that validateRequest=false in Views/web.config, and have set this in the application's root web.config. I have also created a fresh MVC project, created a simple view & controller and posted a simple html paragraph element with the same result. Call stack provided. [HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (html="

hello world

").] System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) +8718538 System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) +111 System.Web.HttpRequest.get_Form() +129 System.Web.HttpRequestWrapper.get_Form() +11 System.Web.Mvc.ValueProviderDictionary.PopulateDictionary() +113 System.Web.Mvc.ValueProviderDictionary..ctor(ControllerContext controllerContext) +74 System.Web.Mvc.ControllerBase.get_ValueProvider() +31 System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +53 System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +109 System.W

Why not Dataset use to Saving?

  

Hie Friends,

I have searched on net and even i worked on 2 huge shipping projects.

Everywhere i found that while binding data to control use dataset but when we save, they recommend use command (use generic collection and create command object with store procedure) why not we use dataset as in .NET 2.0 it is improved lot and data adapter has new feature batchupdatesize.

why we need to create property page which maps to all column in a database.

E.g. if i have employee table with empid and empname in database then i use to create emp.cs with properties of empid and empname and use same properties for saving. If i use these properties for validation in business rule then no problem. But why we use them in saving for creating command object.

Thanks.



saving XML output from webservice

  

 I created a webservice that takes casenum as input and gives results as a dataset in an XML.

I could make a web client to display the resulting dataset in a grid view. Pls see my code copied below.

Now I want to create a console client that takes the casenum as input, to call the webservice and saves the resulting xml for further processing, but can't figure out how to just capture the xml to save. Here's the code for my web client. I would appreciate if you could help modify this tocapture the resulting xml to save file locally.

Thank You.

namespace ResultsWebServicesClient
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        private void BindDataToGrid(string CaseNum)
        {
            FG_Results results = new FG_Results();
            DataSet ds1 = new DataSet();
            ds1 = results.Get_FG_Results(CaseNum);
            GridView1.AutoGenerateColumns = true;
            GridView1.DataSource = ds1.Tables[0];
            GridView1.DataBind();
        }

        protected void GetResults(object sender, EventArgs e)
        {
            BindDataToGrid(CaseNo.Text);
        }

    }
}
 

Saving textbox data to MySql database in asp.net

  

Hi dear coders

though a very simple question to ask, but please tell me how to save and retrieve data in/from my textboxes to/from database (MYSQL) on submit button click.

i know its a very simple task but i cant make it done, so i request you to please send me some working example link or post any helpful code here in asp.net


i will be highly thankful for any kind help from you geniuses.


regards

alok


image.save not saving images

  

I have a piece of code that writes string into an image and save it. It works on one of my site and but not the other. The image.save is not working. If this is a permission problem, which account should I change? I use win server 2003 and IIS 6, and have given ASPNET, NETWORK SERVICE, and anonymous user write access.


Web Deployment with IIS settings of remote server

  

Im trying to deploy a web application project (VS 2010) via team build (TFS 2010), i got to use IIS settings of development server for deployment. So from the project properties I configured the web projects to use Custom web server, (enabled radio button), once i do this the Option in the tab Package/Publish Web "Include all IIS Settings as configured in IIS manager" gets disabled and as a result the deployed web project does not have this IIS settings.

What am I missing here, Im not using the option "Use local IIS Web Server" because the build happens in a build server and would try to take local IIS settings for packaging which is not present.

If this is not possible, suggest me any workaround. Any help on this is greatly appreciated.


CLR Inside Out: Extend Windows Forms Apps Using System.AddIn

  

See how Windows Forms applications can be adapted to use the new .NET Add-in framework (System.AddIn) this month.

Mueez Siddiqui

MSDN Magazine July 2008


C++ at Work: Addin a Combobox Cancel Feature

  

This month Paul DiLascia codes some Microsoft Office-style dialog box features.

Paul DiLascia

MSDN Magazine August 2006


User Preferences: Manage User Settings in Your .NET App with a Custom Preferences API

  

There are plenty of options out there for managing user preferences including custom configuration files, the Windows registry, and the isolated storage. But each option has its pros and cons -- and a bad choice can make life difficult. In this article, the author evaluates various options and identifies the characteristics of a good preferences API. Based on those characteristics, he introduces an API that is specifically designed for preferences management, one that offers the best of all the options.

Ray Djajadinata

MSDN Magazine July 2004


Protect It: Safeguard Database Connection Strings and Other Sensitive Settings in Your Code

  

Protecting application secrets, such as database connection strings and passwords, requires careful consideration of a number of pertinent factors such as how sensitive the data is, who could gain access to it, how to balance security, performance, and maintainability, and so forth. This article explains the fundamentals of data protection and compares a variety of techniques that can be used to protect application settings. The author discusses what to avoid, such as hiding keys in source code and the use of Local Security Authority. In addition, he presents some effective solutions such as the Data Protection API.

Alek Davis

MSDN Magazine November 2003


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend