473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MMC Snapin c#

Hi,

I wolud like to know if there is a way to load or embed a mmc snapin
(like sql server, iis,...) in a windows application. I would like to
display on my Form.

Tks,

Sep 20 '06 #1
2 2240
I don't understand what's going on here.

So in asp.net I have something like this below (vb version):
'---------------------- this part is in the partial page class

Protected Sub snTBx_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
sender.Text = Me.MakeRandom()
End Sub

'---------------------- (the asp page)
<asp:FormView ID="FormView1" CssClass="signuptable" runat="server"
DataKeyNames="ID" DataSourceID="SqlDSource"
OnPageIndexChanging="FormView1_PageIndexChanging"
OnInserting="FormView1_ItemInserting" DefaultMode="Insert"
Width="288px" Height="251px" CellPadding="10">
<InsertItemTemplate>
<span class="signuplabel">name:</span><br />
<asp:TextBox ID="nTBx" runat="server" Text='<%#
Bind("name") %>' Width="250px"
AutoCompleteType="FirstName"></asp:TextBox><br />
<span class="signuplabel">email:</span><br />
<asp:TextBox ID="eTBx" runat="server" Text='<%#
Bind("email") %>' Width="250px"
AutoCompleteType="Email"></asp:TextBox><br />
<asp:TextBox ID="snTBx" runat="server" Text='<%#
Bind("srnumbr") %>' Visible="False" Height="0px"
OnLoad="snTBx_Load"></asp:TextBox><br />
<asp:Button ID="InsertButton" runat="server"
CausesValidation="true" CommandName="Select" Text="Sign me up"
UseSubmitBehavior="false" OnClick="InsertButton_Click" />
</InsertItemTemplate>
</asp:FormView>

So I decided to convert that to c#. Everything started working well
until the sender. Anyhow this is how the above converts over to c#

//---------------------- the partial page class
protected void snTBx_Load(object sender, EventArgs e){
sender.Text = this.MakeRandom();
}
//---------------------- (the asp page)

<asp:FormView ID="FormView1" CssClass="signuptable" runat="server"
DataKeyNames="ID" DataSourceID="SqlDSource" DefaultMode="Insert"
Width="288px" Height="251px" CellPadding="10">
<InsertItemTemplate>
<span class="signuplabel">name:</span><br />
<asp:TextBox ID="nTBx" runat="server" Text='<%#
Bind("name") %>' Width="250px"
AutoCompleteType="FirstName"></asp:TextBox><br />
<span class="signuplabel">email:</span><br />
<asp:TextBox ID="eTBx" runat="server" Text='<%#
Bind("email") %>' Width="250px"
AutoCompleteType="Email"></asp:TextBox<br />
<asp:TextBox ID="snTBx" runat="server" Text='<%#
Bind("srnumbr") %>' Visible="true" Height="10px"
OnLoad="snTBx_Load">sadfasdfsa</asp:TextBox><br />
<asp:Button ID="InsertButton" runat="server"
CausesValidation="true" CommandName="Select" Text="Sign me up"
UseSubmitBehavior="false" OnClick="InsertButton_Click" />
</InsertItemTemplate>
</asp:FormView>
Again it seems that the sender doesn't allow for the text property,
so I thought I could try to page load the information, but I can't
seem to reference it through intellisense. How do you get the items
in the insertitemtemplate?

Thanks in advance for all your help,

Kelly
Oct 31 '06 #2
Ok I found out that you have to do something like this to get the items inside:

textbox spectxt = formview1.FindControl("atextboxItem")

Just sending this on incase if someone else had a similar issue
Warmly,

Kelly

Nov 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Avinash P. | last post by:
Hi All, My mmc snapin application written in c# logs all its events in custom event source that we have created for this application. When any error occurs the application also displays a...
0
by: awf_ng | last post by:
I'm writing a MMC snapin in .NET. The problem I have is that I need to access configuration information, which needs to be stored in the App.config file. Being a MMC snapin, if I use the...
2
by: Julia | last post by:
Hi, I am using Ironing MMC library to create a C# MMC snapin But I didn't succeeded to debug it either using Attach to process or using Assert to break into the code The assert is being...
1
by: Julia | last post by:
My service send email messages and log all information to a log file I wonder if it's common to raise events from the service(the remote object which hosted inside the service) to my MMC snapin,...
0
by: Patrick Philippot | last post by:
Hi, Since the suggested registry workaround was irrelevant in my case, I have done some debugging. I have found out that one essential registry key...
0
by: patrick_boyd | last post by:
Hi I'm trying to write an MMC SnapIn for a 64-bit system. I'm using MMC 3.0 and the managed framework for the SnapIns with C#. I get an error saying Unable to cast object of type 'TestSnapIn' to...
0
by: Gambia Guy | last post by:
Trying to add a picture field to one of the tabs in MS Active Directory Users and Computers snap-in. Has anyone seen this done? Is it possible? I have found a Technet reference that adds a salary...
5
by: Les Caudle | last post by:
On a new win2003 Standard install, I installed IIS and ASP.NET. I then installed .NET Framework 2.0 from MS Updates. In the management console, I've added in a .NET Configuration 1.1 snapin. ...
0
by: auad | last post by:
Hi, I wolud like to know if there is a way to load or embed a snapin (like sql server, iis,...) in a windows application. I would like to display on my Form. Tks,
4
by: BR | last post by:
Hi, I am writing a small utility to perform system maintainence tasks on Windows. In this, I am launching a MMC snapin as a process using BackGroundWorker and using the "RunWorkerCompleted"...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.