|
I am creating a deployment project. I have used custom action, and installing database. Username and password will be get from user. I also edited password character as * using Orca. But i dont know how to set msiHiddenProperties for the password. Even though the password is *, The parameter shows the password and also in log file. How to hide the parameters and user entered text in log file. and also how to use verbose log method
my email id: haikumars@gmail.com
Thanks
KumarShanmugam
|
|
|
|
|
Hi to all.
I'm using the below given code to connect the interfaces rowprovider and row consumer,
the Row provider, doesnt get connected with Row consumer
CODE FOR ROW CONSUMER
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using Microsoft.SharePoint.WebPartPages;
using Microsoft.SharePoint.WebPartPages.Communication;
using System.Data;
using System.Runtime.InteropServices;
namespace MyWebParts
{
///
/// Summary description for RowConsumer.
///
[GuidAttribute("66C28F7F-9B1E-4ba4-B16F-FCF391088C57")]
[ToolboxData("<{0}:RowConnectedConsumer runat=server>")]
public class RowConnectedConsumer : WebPart, IRowConsumer
{
//Used to keep track of whether or not the connection will be running client-side
private bool _runAtClient = false;
//Keep a count of IRow connections
private int _rowConnectedCount = 0;
//Web Part UI
private DataGrid _dataGrid;
///
///----Notification to the Web Part that is should ensure that all
///----its interfaces are registered using RegisterInterface.
///
public override void EnsureInterfaces()
{
//Register the IRowConsumer interface
RegisterInterface("MyRowConsumerInterface_WPQ_", //InterfaceName: Friendly name of the interface
"IRowConsumer", //InterfaceType: The type of the interface
WebPart.UnlimitedConnections, //MaxConnections: sets how many connections can
//be formed on this interface
ConnectionRunAt.ServerAndClient, //RunAtOptions: where the interface can be run
this, //InterfaceObject: reference to the actual
//object that implements this interface
"RowConsumerInterface_WPQ_", //InterfaceClientReference: for client-side connections, a
//string that is used as the identifier for the client-side
//object that implements this interface
"MyRowConsumer", //MenuLabel: a general label for the interface
//(used in Authoring Connections)
"Just a simple IRowConsumer"); //Description: an extended explanation of the
//interface (used in Authoring Connections)
}
///
///----Called by the framework to determine whether a part thinks
///----that it can be run on the client or server based on the current
///----configuration.
///
public override ConnectionRunAt CanRunAt()
{
//This Web Part can run on both the client and the server
return ConnectionRunAt.ServerAndClient;
}
///
///----Notification to the Web Part that it has been connected. The
///----framework uses this to inform a part that it is connected as
///----soon as it connects up the appropriate events for the connection.
///
public override void PartCommunicationConnect(string interfaceName,
WebPart connectedPart,
string connectedInterfaceName,
ConnectionRunAt runAt)
{
//Check if this is my particular cell interface
if (interfaceName == "MyRowConsumerInterface_WPQ_")
{
//Keep a count of the connections
_rowConnectedCount++;
}
//Check to see if this is a client-side part
if (runAt == ConnectionRunAt.Client)
{
//This is a client-side part
_runAtClient = true;
return;
}
//Must be a server-side part so need to create the Web Part's controls
EnsureChildControls();
}
//PartCommunicationInit and PartCommunicationMain are not needed in this case for the Consumer,
//because the Consumer doesn't have any events that it needs to fire
//during either of these phases.
//GetInitArgs is not needed in this case because IRowConsumer never
//requires a transformer
//PartCommunicationNeedData, BeginDataRetrieval, and EndDataRetrieval are not
//needed for this Web Part because it doesn't have to do any asynchronous
//data fetching.
///
/// The RowProviderInit event handler.
/// The Provider part will fire this event during its PartCommunicationInit phase
///
public void RowProviderInit(object sender, RowProviderInitEventArgs rowProviderInitArgs)
{
//This is where the Consumer part could see what type of "Row" the Provider
//will be sending.
//Need to ensure that all of the Web Part's controls are created
EnsureChildControls();
//Need to add the columns to the DataGrid source table
for(int i = 0; i <= rowProviderInitArgs.FieldList.GetUpperBound(0); i++)
{
// Add a column object to the table
DataColumn dataColumn = new DataColumn();
dataColumn.ColumnName = rowProviderInitArgs.FieldList[i];
if(rowProviderInitArgs.FieldDisplayList != null)
{
dataColumn.Caption = rowProviderInitArgs.FieldDisplayList[i];
}
((DataTable)_dataGrid.DataSource).Columns.Add(dataColumn);
}
//Bind the data grid
_dataGrid.DataBind();
}
///
/// The RowReady event handler.
/// The Provider part will fire this event during its PartCommunicationMain phase
///
/// <param name="sender" />Provider Web Part
/// <param name="rowReadyArgs" />The args passed by the Provider
public void RowReady(object sender, RowReadyEventArgs rowReadyArgs)
{
//Add the Rows that were passed by the Provider to the DataGrid's
//source table
if(rowReadyArgs.Rows != null)
{
if(rowReadyArgs.Rows[0] != null)
{
for(int i = 0; i <= rowReadyArgs.Rows.GetUpperBound(0); i++)
{
object[] rowItems = rowReadyArgs.Rows[i].ItemArray;
DataRow dr = ((DataTable)_dataGrid.DataSource).NewRow();
dr.ItemArray = rowItems;
((DataTable)_dataGrid.DataSource).Rows.Add(dr);
}
///
/// Render this Web Part control to the output parameter specified.
///
/// <param name="output" /> The HTML writer to write out to
protected override void RenderWebPart(HtmlTextWriter output)
{
//Need to ensure that all of the Web Part's controls are created
EnsureChildControls();
//Is it connected?
if(_rowConnectedCount > 0)
{
//Render client connection code if the connection is client-side
if (_runAtClient)
{
output.Write(ReplaceTokens(" Connected: Client-Side "
+ "\n"
+ "Field List: \n"
+ "Field Display List: \n"
+ " function Consumer_WPQ_()\n"
+ " {\n"
+ " this.RowProviderInit = RowProviderInit_WPQ_;\n"
+ " this.RowReady = RowReady_WPQ_;\n"
+ " }\n"
+ " function RowProviderInit_WPQ_(sender, rowProviderInitArgs)\n"
+ " {\n"
+ " var adBSTR = 8;\n"
+ " var columnCount;\n"
+ " if(rowProviderInitArgs.FieldDisplayList != null)\n"
+ " {\n"
+ " columnCount = rowProviderInitArgs.FieldDisplayList.length;\n"
+ " rowFieldNames_WPQ_ = rowProviderInitArgs.FieldDisplayList;\n"
+ " }\n"
+ " else\n"
+ " {\n"
+ " columnCount = rowProviderInitArgs.FieldList.length;\n"
+ " rowFieldNames_WPQ_ = rowProviderInitArgs.FieldList;\n"
+ " }\n"
+ " document.all(\"FieldList_WPQ_\").innerHTML = \"Field List: \";\n"
+ " document.all(\"FieldDisplayList_WPQ_\").innerHTML = \"Field Display List: \";\n"
+ " if(rowProviderInitArgs.FieldList != null)\n"
+ " {\n"
+ " for(var i = 0; i < rowProviderInitArgs.FieldList.length; i++)\n"
+ " {\n"
+ " document.all(\"FieldList_WPQ_\").innerHTML += rowProviderInitArgs.FieldList[i] + \";\";\n"
+ " }\n"
+ " }\n"
+ " else\n"
+ " {\n"
+ " document.all(\"FieldList_WPQ_\").innerHTML += \"NULL\";\n"
+ " }\n"
+ " if(rowProviderInitArgs.FieldDisplayList != null)\n"
+ " {\n"
+ " for(var i = 0; i < rowProviderInitArgs.FieldDisplayList.length; i++)\n"
+ " {\n"
+ " document.all(\"FieldDisplayList_WPQ_\").innerHTML += rowProviderInitArgs.FieldDisplayList[i] + \";\";\n"
+ " }\n"
+ " }\n"
+ " else\n"
+ " {\n"
+ " document.all(\"FieldDisplayList_WPQ_\").innerHTML += \"NULL\";\n"
+ " }\n"
+ " RenderTable_WPQ_(null, true);\n"
+ " }\n"
+ " function RowReady_WPQ_(sender, rowReadyArgs)\n"
+ " {\n"
+ " RenderTable_WPQ_(rowReadyArgs.Rows, false);\n"
+ " document.all('DataTable_WPQ_').innerHTML += 'SelectionStatus: ' + rowReadyArgs.SelectionStatus + ' ';\n"
+ " }\n"
+ " function RenderTable_WPQ_(dataTable, emptyTable)\n"
+ " {\n"
+ " tableHTML = '';\n"
+ " for(var i = 0; i < rowFieldNames_WPQ_.length; i++)\n"
+ " {\n"
+ " tableHTML += '';\n"
+ " }\n"
+ " tableHTML += '';\n"
+ " if(!emptyTable)\n"
+ " {\n"
+ " if(!dataTable.EOF || ! dataTable.BOF)\n"
+ " {\n"
+ " var columnCount = dataTable.Fields.Count;\n"
+ " dataTable.MoveFirst();\n"
+ " do\n"
+ " {\n"
+ " tableHTML += '';\n"
+ " for(var i = 0; i < columnCount; i++)\n"
+ " {\n"
+ " tableHTML += '';\n"
+ " }\n"
+ " tableHTML += '';\n"
+ " dataTable.MoveNext();\n"
+ " }\n"
+ " while(!dataTable.EOF);\n"
+ " }\n"
+ " }\n"
+ " tableHTML += '';\n"
+ " tableHTML += rowFieldNames_WPQ_[i];\n"
+ " tableHTML += ' |
---|
';\n"
+ " tableHTML += dataTable.Fields(i).Value;\n"
+ " tableHTML += ' | ';\n"
+ " document.all('DataTable_WPQ_').innerHTML = tableHTML;\n"
+ " }\n"
+ "//-->\n"
+ "\n"));
}
else
{
//Just render some informational text
output.RenderBeginTag(HtmlTextWriterTag.Br);
output.RenderEndTag();
output.RenderBeginTag(HtmlTextWriterTag.H5);
output.Write("Connected Server-Side");
output.RenderEndTag();
output.RenderBeginTag(HtmlTextWriterTag.Br);
output.RenderEndTag();
//Render the DataGrid control
_dataGrid.RenderControl(output);
}
}
else
{
//There wasn't a row connection formed,
//so just output a message
output.Write("NO ROW INTERFACE CONNECTION");
}
}
///
/// Create all of the controls for this Web Part
///
protected override void CreateChildControls()
{
//Create the DataGrid
_dataGrid = new DataGrid();
//Create the DataTable
DataTable dataTable = new DataTable();
//Set the DataGrid's DataSource
_dataGrid.DataSource = dataTable;
_dataGrid.ID = "DataGrid";
}
}
}
CODE FOR ROW PROVIDER
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Microsoft.SharePoint.WebPartPages;
using Microsoft.SharePoint.WebPartPages.Communication;
using System.Data;
namespace MyWebParts
{
///
/// Summary description for WebCustomControl1.
///
[ToolboxData("<{0}:RowConnectedWP runat=server>")]
[GuidAttribute("0E01E611-EDC3-4098-AC5D-5526E35F56F1")]
public class RowConnectedWP : WebPart, IRowProvider
{
//RowProviderInit Event
public event RowProviderInitEventHandler RowProviderInit;
//RowReady Event
public event RowReadyEventHandler RowReady;
//Used to keep track of whether or not the connection will be running client-side
private bool _runAtClient = false;
//Keep a count of IRow connections
private int _rowConnectedCount = 0;
//Web Part UI
private Button _rowButton;
private DataGrid _dataGrid;
//Row information
private string[] _rowFieldNames;
private string[] _rowFieldDisplayNames;
//Used to keep track of whether or not the Button in the Web Part was clicked
private bool _rowButtonClicked = false;
///
///----Notification to the Web Part that is should ensure that all
///----its interfaces are registered using RegisterInterface.
///
public override void EnsureInterfaces()
{
//Register the IRowProvider interface
RegisterInterface("MyRowProviderInterface_WPQ_", //InterfaceName: Friendly name of the interface
"IRowProvider", //InterfaceType: The type of the interface
WebPart.UnlimitedConnections, //MaxConnections: sets how many connections can
//be formed on this interface
ConnectionRunAt.ServerAndClient, //RunAtOptions: where the interface can be run
this, //InterfaceObject: reference to the actual
//object that implements this interface
"RowProviderInterface_WPQ_", //InterfaceClientReference: for client-side connections, a
//string that is used as the identifier for the client-side
//object that implements this interface
"MyRowProvider", //MenuLabel: a general label for the interface
//(used in Authoring Connections)
"Just a simple IRowProvider"); //Description: an extended explanation of the
//interface (used in Authoring Connections)
}
///
///----Called by the framework to determine whether a part thinks
///----that it can be run on the client or server based on the current
///----configuration.
///
public override ConnectionRunAt CanRunAt()
{
//This Web Part can run on both the client and the server
return ConnectionRunAt.ServerAndClient;
}
///
///----Notification to the Web Part that it has been connected. The
///----framework uses this to inform a part that it is connected as
///----soon as it connects up the appropriate events for the connection.
///
public override void PartCommunicationConnect(string interfaceName,
WebPart connectedPart,
string connectedInterfaceName,
ConnectionRunAt runAt)
{
//Check if this is my particular cell interface
if (interfaceName == "MyRowProviderInterface_WPQ_")
{
//Keep a count of the connections
_rowConnectedCount++;
}
//Check to see if this is a client-side part
if (runAt == ConnectionRunAt.Client)
{
//This is a client-side part
_runAtClient = true;
return;
}
//Must be a server-side part so need to create the Web Part's controls
EnsureChildControls();
}
///
///----At this time, a part should fire any events that end with 'Init'
///----if they can.
///
public override void PartCommunicationInit()
{
//If the connection wasn't actually formed then don't want to send Init event
if(_rowConnectedCount > 0)
{
//If there is a listener, send init event
if (RowProviderInit != null)
{
//Need to create the args for the RowProviderInit event
RowProviderInitEventArgs rowProviderInitArgs = new RowProviderInitEventArgs();
//Set the FieldNames
rowProviderInitArgs.FieldList = _rowFieldNames;
//Set the FieldDisplayNames
rowProviderInitArgs.FieldDisplayList = _rowFieldDisplayNames;
//Fire the RowProviderInit event.
//This basically tells the Consumer Web Part what type of
//DataRow it will be receiving when RowReady is fired later.
RowProviderInit(this, rowProviderInitArgs);
}
}
}
///
///----A part can fire any events that it wants to in Main.
///
public override void PartCommunicationMain()
{
//If the connection wasn't actually formed then don't want to send Ready event
if(_rowConnectedCount > 0)
{
//If there is a listener, send RowReady event
if (RowReady != null)
{
//Need to create the args for the RowProviderInit event
RowReadyEventArgs rowReadyArgs = new RowReadyEventArgs();
//If user clicked button then send the value
if (_rowButtonClicked)
{
//Need to generate the array of DataRow(s) from the
//DataGrid's DataSource
DataRow[] dr = new DataRow[1];
dr[0] = ((DataTable)_dataGrid.DataSource).Rows[0];
//Set the Rows to the value of the first row in the DataGrid
//This is the value that will be sent to the Consumer
rowReadyArgs.Rows = dr;
//Set the SelectionStatus value
rowReadyArgs.SelectionStatus = "Standard";
}
else
{
//The user didn't actually click the button
//so just send a null DataRow to the Consumer
DataRow[] dr = new DataRow[1];
dr[0] = null;
rowReadyArgs.Rows = dr;
//Set the SelectionStatus value
rowReadyArgs.SelectionStatus = "None";
}
//Fire the RowReady event.
//The Consumer will then receive the DataRow array
RowReady(this, rowReadyArgs);
}
}
}
///
///----The GetInitArgs method is called by the Authoring environment for all
///-----the initial data required for creating a connection. It is a virtual
///-----method on the WebPart base class which needs to be overridden by the
///-----developer. The method returns the InitArgs object and takes in the
///-----interface name.
///
public override InitEventArgs GetInitEventArgs(string interfaceName)
{
//Check if this is my particular cell interface
if (interfaceName == "MyRowProviderInterface_WPQ_")
{
EnsureChildControls();
//Need to create the args for the RowProviderInit event
RowProviderInitEventArgs rowProviderInitArgs = new RowProviderInitEventArgs();
//Set the FieldList
rowProviderInitArgs.FieldList = _rowFieldNames;
//Set the FieldDisplayNames
rowProviderInitArgs.FieldDisplayList = _rowFieldDisplayNames;
//return the InitArgs
return(rowProviderInitArgs);
}
else
{
return(null);
}
}
//PartCommunicationNeedData, BeginDataRetrieval, and EndDataRetrieval are not
//implemented for this Web Part because it doesn't have to do any asynchronous
//data fetching.
///
/// Render this Web Part control to the output parameter specified.
///
protected override void RenderWebPart(HtmlTextWriter output)
{
//Need to ensure that all of the Web Part's controls are created
EnsureChildControls();
//Is it connected?
if(_rowConnectedCount > 0)
{
//Render client connection code if the connection is client-side
if (_runAtClient)
{
output.Write(ReplaceTokens(" Connection: Client-Side "
+ "\n"
+ "Fire checked rows\n"
+ "\n"
+ " \n"
+ " \n"
+ "\n"
+ "\n"
+ "\n"
+ "\n"
+ "\n"
+ "\n")
);
}
else
{
//Just render some informational text
output.RenderBeginTag(HtmlTextWriterTag.Br);
output.RenderEndTag();
output.Write("Connected: Server-Side");
output.RenderBeginTag(HtmlTextWriterTag.Br);
output.RenderEndTag();
//Render the DataGrid control
_dataGrid.RenderControl(output);
//Render the Button
_rowButton.RenderControl(output);
}
}
else
{
//There wasn't a row connection formed,
//so just output a message
output.Write("NO ROW INTERFACE CONNECTION");
}
}
///
/// Create all of the controls for this Web Part
///
protected override void CreateChildControls()
{
//Create the Button
_rowButton = new Button();
_rowButton.ID = "RowButton";
_rowButton.Text = "Fire RowReady";
Controls.Add(_rowButton);
//Create the DataGrid
_dataGrid = new DataGrid();
//Create the DataTable
DataTable dataTable = new DataTable();
// Add three column objects to the table.
DataColumn idColumn = new DataColumn();
idColumn.DataType = System.Type.GetType("System.Int32");
idColumn.ColumnName = "id";
idColumn.Caption = "ID";
idColumn.AutoIncrement = true;
dataTable.Columns.Add(idColumn);
DataColumn fNameColumn = new DataColumn();
fNameColumn.DataType = System.Type.GetType("System.String");
fNameColumn.ColumnName = "FName";
fNameColumn.Caption = "First Name";
dataTable.Columns.Add(fNameColumn);
DataColumn lNameColumn = new DataColumn();
lNameColumn.DataType = System.Type.GetType("System.String");
lNameColumn.ColumnName = "LName";
lNameColumn.Caption = "Last Name";
dataTable.Columns.Add(lNameColumn);
DataColumn ageColumn = new DataColumn();
ageColumn.DataType = System.Type.GetType("System.Int32");
ageColumn.ColumnName = "Age";
ageColumn.Caption = "Age";
dataTable.Columns.Add(ageColumn);
// Once a table has been created, use the NewRow to create a DataRow.
DataRow dataRow;
dataRow = dataTable.NewRow();
// Then add the new row to the collection.
dataRow["FName"] = "Gabrielle";
dataRow["LName"] = "Viso";
dataRow["Age"] = 7;
dataTable.Rows.Add(dataRow);
//Add a second row
dataRow = dataTable.NewRow();
// Then add the new row to the collection.
dataRow["FName"] = "Christina";
dataRow["LName"] = "Viso";
dataRow["Age"] = 4;
dataTable.Rows.Add(dataRow);
//And a third
dataRow = dataTable.NewRow();
// Then add the new row to the collection.
dataRow["FName"] = "Tom";
dataRow["LName"] = "Rizzo";
dataRow["Age"] = 30;
dataTable.Rows.Add(dataRow);
//And a fourth
dataRow = dataTable.NewRow();
// Then add the new row to the collection.
dataRow["FName"] = "Stacy";
dataRow["LName"] = "Eckstein";
dataRow["Age"] = 30;
dataTable.Rows.Add(dataRow);
//And a fifth
dataRow = dataTable.NewRow();
// Then add the new row to the collection.
dataRow["FName"] = "Susan";
dataRow["LName"] = "Rizzo";
dataRow["Age"] = 34;
dataTable.Rows.Add(dataRow);
//Set the DataGrid's DataSource
_dataGrid.DataSource = dataTable;
_dataGrid.ID = "DataGrid";
_dataGrid.Attributes.Add("WDFLibID", "ServerSideRowProvider_DataGrid");
_dataGrid.DataBind();
//Set the DataTable FieldName information.
//This information will be passed to the Consumer by
//firing the RowProviderInit event.
int columnCount = dataTable.Columns.Count;
_rowFieldNames = new string[columnCount];
_rowFieldDisplayNames = new string[columnCount];
for(int i = 0; i < columnCount; i++)
{
_rowFieldNames[i] = dataTable.Columns[i].ColumnName;
_rowFieldDisplayNames[i] = dataTable.Columns[i].Caption;
}
_rowButtonClicked = false; // Initialize to false -- user hasn't clicked yet
_rowButton.Click += new EventHandler(RowButtonClicked); // Rowen for Button's click event
}
///
/// The Button OnClick event handler
///
/// <param name="sender" />The Button object
/// <param name="e" />The Event Arguments
private void RowButtonClicked(object sender, EventArgs e)
{
_rowButtonClicked = true; //user clicked button, set to true
}
}
}
|
|
|
|
|
Good grief why did you post that entire mess? couldn't you have narrowed it down the problematic portion of the code?
What is with all the string concatenation garbage? Is this production code or some class assignment? Aren't there classes that help generate Javascript code? At lease use a StringBuilder.
Please someone tell me that this is not reflective of the normal state of web development today!
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
|
hello all.
please help me on this error "Failed to access IIS metabase. " this error comes when i run a aspx page build in asp.net 2.0 version.
-- modified at 0:24 Tuesday 9th May, 2006
|
|
|
|
|
you can search this error on microsoft.com. It's a common error when you work with ASP.NET 2.0 especially in Windows XP. You can change the enviroment programming to Windows Server 2003 (SP1) which operates better than Windows XP.
|
|
|
|
|
with vs.net studio, it is simple to create a window service, and adding a notifyicon to bring it to system tray. But now how to add the context menu to this system trayed window service.
|
|
|
|
|
Hi all,
We are similar with Sniffer.NET program (written in VB.NET) in NETWORK topic, it's Packet Filtering.
I want to develop this project, for example "DoS recognition" module.
My idea depends on information in packet filtering to do this module.
For example, we can count the number of packet go through, total length of packets...per second. From these parameters and base on the rules (user defined), we can recognize the DoS such as Smurf or Fraggle attack...
Because of the various of DoS attacks, so I need your support.
Give your idea if you can!;)
I think it's very interesting!
Thanks a lot!
|
|
|
|
|
Look at SNORT (linux IDS) for ideas.
|
|
|
|
|
Is there a way to actually stop unauthorized use of code in a DLL?
The article on SecUtil[^] sounds nice, but doesn't work at all, unless I'm missing something painfully obvious.
I've got a signed DLL with a single public class exposing a single public method:
public class Thingy
{
private const string PUBLIC_KEY = "0x00..."
[StrongNameIdentityPermission(SecurityAction.Demand, PublicKey = PUBLIC_KEY)]
public Thingy ()
{
}
[StrongNameIdentityPermission(SecurityAction.Demand, PublicKey = PUBLIC_KEY)]
public int Add (int v1, int v2)
{
return (v1 + v2);
}
}
And I'm calling it in a separate unsigned application:
private void button1_Click (object sender, EventArgs e)
{
Thingy thingy = new Thingy();
int result = thingy.Add(6, 7);
MessageBox.Show("6 + 7 = " + result.ToString());
}
It should be protected, and yet I get my message box "6 + 7 = 13" just fine.
Any ideas?
--
I've killed again, haven't I?
|
|
|
|
|
Okay, it seems to work in .NET 1.1, but not in .NET 2.0.
Apparently .NET 2.0 has said, "The hell with security." One can easily run any code in a trusted zone without any regard whatsoever to standing individual assembly security requirements set by StrongNameIdentityPermission.
--
I've killed again, haven't I?
|
|
|
|
|
Hi everybody!
I want to check if two HTMLDocuments represent the same structure of HTML file. My problem is that I don't know how should I use the WebBrowser.DocumentCompleted Event to be sure that document has been loaded. I've got two files so I should wait for both of them ( how ?)
I would greatly appreciate your help.
|
|
|
|
|
makuda wrote: how should I use the WebBrowser.DocumentCompleted Event
You shouldn't. Why are you using the WebBrowser control to compare two HTML documents rather than using System.Net.WebRequest and WebResponse?
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
I don't want compare each sign, becouse I don't care about atributes. For example:
------- textA ---------
something
cos tam
---- endtextA ----
------- textB ---------
something
style="color: Red;">cos tam
---- endtextB ----
These files are equal.
So I want to create document tree for both files, and compare these trees.
|
|
|
|
|
These files are equal, not those
------- text 1 ---------
something.
cos tam
---- end text 1 ----
------- text 2 ---------
something.
style="color: Red;">cos tam
---- end text 2 2 ----
|
|
|
|
|
:/ I've forgotten tick "Ignore HTML tags"
These files are equal, not those
------- text 1 ---------
<P align="justify">
something
</p><SPAN style="color: Red;">buhuhu
</sPAn>
---- end of text 1 ----
------- text 2 ---------
<p>
something
</p>
<span> style="color: Red;">buhuhu</span>
---- end of text 2 ----
|
|
|
|
|
If you will build a DOM tree you will get different tree's.
You will have to use some other aproach...
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Ok. The trees coulde be diffrent. But when I'll comparing these trees I coudle ignore atributes, coulde I ?
If not, maybe you have some idea how to solve my problem?
|
|
|
|
|
could not coulde
|
|
|
|
|
Hi,
I have a dataset with some values from DB. I want to show the dataset as tooltip to a particular control, say a list box. How do I do that.
Thanks in advance.
|
|
|
|
|
ToolTip tp = New ToolTip();
tp.SetToolTip(listbox1, ds.GetXml());
|
|
|
|
|
how can i create a custom control with some properties i can see in property visual studio window when i use it inside a form?
|
|
|
|
|
You have to use fields, you cannot just make variables public:
This will not work:
public int MyInteger=1;
This will:
private int myInteger=1;
public int MyInteger
{
get
{
return myInteger;
}
set
{
myInteger=value;
}
}
If you want variables to be read only, just omit the set accessor:
private int myInteger=1;
public int MyInteger
{
get
{
return myInteger;
}
}
You can adjust the visible attributes in the property designer:
private int myInteger=1;
[Description("A useless number."),Category("Behavior")]
public int MyInteger
{
get
{
return myInteger;
}
set
{
myInteger=value;
}
}
Hope this helps,
DigitalKing
|
|
|
|
|
|
Hi Guys,
First up, my apologies because this is a cross forum post - I just wanted to try it in here as it seems a little busier!
I'm writing a C# application to help configure a Windows CE device (4.2), which I think only supports .Net CF 1.1 (this is a whole other headache at the moment, as I only have .Net 2.0 at the moment).
Part of the spec is to configure RAS phone book entries. Now I've managed to find quite a lot of information on MSDN about the RAS, but it all seems geared towards C++ development, which I haven't looked at in over 10 years, and my skills in that language were never that great anyway.
I wondered if any of you could perhaps point me towards a good guide on using the RAS registry entries from C#; My particular areas of interest are how the Passwords are stored in the registry (I've managed to find the entries in the registry, however they are in binary), whether passwords are encrypted and also how the dial string is stored (especially the extra connection settings "+cgdcont=...".
TIA,
Martin.
|
|
|
|
|