Passing parameters to Windows Controls

N

Neelima Godugu

Hi All,

I have developed a windows forms user control, which I am going to host in
Internet Explorer..
I am familiar with the security settings requirement inorder to do the
above.
I have successfully gotten it working. The only problem I have is with
passing parameters to the Windows Forms User control from IE
I am using the Object tag to instantiate the IE object
I am using param tags inside object tag to pass paramaters but the values
are not set in the windows controls. I have properties defined inside the
Windows Controls with the same name as the param names.
I am not able to figure out why the param values passed are not set to the
property variables.
Any feedback will be appreciated.
CONTROL SOURCE CODE
========================
========================
using System;
using System.Collections;

using System.ComponentModel;

using System.Drawing;

using System.Data;

using System.Windows.Forms;

using Word = Microsoft.Office.Interop.Word;

using System.IO;
namespace Dovarri

{
public class WriteALetter : System.Windows.Forms.UserControl

{
private string m_Output;
private string m_DocType = "";

public WriteALetter()
{
}
// PARAMs
public string Output
{
get { return m_Output;}
set
{
m_Output = value;
}
}

// PARAMs
public string DocType
{
get { return m_DocType;}
set
{
m_DocType= value;
}
}
}






==========================

WEB FORM SOURCE CODE

<%@ Page language="c#" Codebehind="MailMergeSelector.aspx.cs"
AutoEventWireup="false" Inherits="TestWriteALetter.MailMergeSelector" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>MailMergeSelector</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK href="/TestWriteALetter/Include/AppCSS.css" type="text/css"
rel="stylesheet">
</HEAD>
<body MS_POSITIONING="GridLayout" bottommargin="5">
<form id="Form1" method="post" runat="server">
<asp:table id="Table1" runat="server" CssClass="AppMainBorderNoTab"
Height="220" HorizontalAlign="Center">
<asp:TableRow>
<asp:TableCell height="60%" CssClass="AppTextBlk">
<asp:Literal runat="server" ID="Literal1"></asp:Literal>
<OBJECT id=WriteALetter height=220 width = 320
classid=http:WriteALetterControl.dll#Dovarri.WriteALetter VIEWASTEXT>
<param name='Output' VALUE ='TEST'>
<param name='DocType' VALUE ='DIR'>
</OBJECT>
</asp:TableCell>
</asp:TableRow>
</asp:table>
</form>
</body>
</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top