Showing posts with label point. Show all posts
Showing posts with label point. Show all posts

Wednesday, March 21, 2012

please help Im a designer not a network guy

I'm trying to edit a share point services site in front page but it won't let me use any of the web parts on the server. When I try to add a webpart or open a page with webparts added through the browserI keep getting this message:

A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe.

When I click on details it further explains:

soap:Server Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown. A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered as safe on this site. You may not be able to open this page in an HTML editor that is compatible with Microsoft Windows SharePoint Services, such as Microsoft Office FrontPage. To fix this page, contact the site administrator to have the Web Part or Web Form Control configured as safe. You can also remove the Web Part or Web Form Control from the page by using the Web Parts Maintenance Page. If you have the necessary permissions, you can use this page to disable Web Parts temporarily or remove personal settings. For more information, contact your site administrator.

I contacted my site administrator and she doesn't want to help me so I figure if I can tell her exactly how to fix the problem she might be more inclined to hear me out. I might need it explained as simply as possible because I'm not a networking genius and I don't think our systems administrator is either.You may want to hit up a Sharepoint site for more help... but it sounds like the new webpart you have (I'm assuming you wrote it?) isn't added into Sharepoint... not sure how to do it personally but I would think a post to a Sharepoint site/newsgroup/forum may get you better/more results.

please help me for this problem, as I havent done it before.

Hi, all

I want help for the below mentioned problems. PLease give example with source code. Please help me.


1. I have made upto this point. Now i want the functionality that when i enter the item orderd and discount the amount column should be updated as per the
following formula.
amount = rate*item orderd - discount

2. As the amount column updated the sub total should be changed.

3. as the user enter the taxes the grand total should also be changed.

Regards

sp_412000@dotnet.itags.org.yahoo.com



<%@dotnet.itags.org. Import Namespace="System.Data" %>
<%@dotnet.itags.org. Import Namespace="System.Data.OleDb" %>
<script runat="server" language="C#">
void Page_Load(Object src,EventArgs e)
{
OleDbConnection dbConn =
new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=/studynet/Authors2k.mdb;User Id=admin;Password=;" );
OleDbDataAdapter dbAdap = new OleDbDataAdapter("SELECT item_id,item_name,unit,rate,stock FROM product",dbConn);
DataSet ds = new DataSet();
dbAdap.Fill(ds,"product");
rept.DataSource = ds.Tables["product"].DefaultView;
rept.DataBind();
}
</script>
<html>
<form id="form1" runat="server">
<asp:repeater id="rept" runat="server">
<HeaderTemplate>
<table>
<tr>
<th>Del</th>
<th>Item #</th>
<th>Name</th>
<th>Unit</th>
<th>Rate</th>
<th>Item Ordered</th>
<th>Discount</th>
<th>Amount</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:CheckBox id="chk1" runat="server" />
</td>
<td>
<%# DataBinder.Eval(Container.DataItem,"item_id") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem,"item_name") %>
</td>
<td>
<#% DataBinder.Eval(Container.DataItem,"unit") %>
</td>
<td>
<#% DataBinder.Eval(Container.DataItem,"rate") %>
</td>
<td>
<asp:textbox id="txt1" runat="server" />
</td>
<td>
<asp:textbox id="txt2" runat="server" />
</td>
<td>
<asp:textbox id="txt3" runat="server" />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:repeater>
sub total: <asp:textbox id="subtot" runat="server" />
Taxes: <asp:textbox id="taxes" runat="server" />
Grand Total: <asp:textbox id="gtot" runat="server" />
</form>
</html>


the easiest way would be to add a button that performs the math functions when clicked
If you want it to be "automatic" then you would add a onchange eventfor the textboxes and have them do the approproate math when the textchanges
HTH

Friday, March 16, 2012

Please help me with bandobjects

I am trying to do something VERY simple. I want to use this:

http://www.codeproject.com/csharp/d...7553#xx714692xx

to point to a web page.

I cannot use process.start because it opens the webpage in the last
opened IE window, not the window which is currently active. So, I am
trying to use the Microsoft Internet Controls COM.

I found out that I cannot simply add the COM reference and compile
it's objects. It wanted a strong name.

Being very new the below was the best I could do.

Best I can tell I made Interop.SHDocVwLib.dll a strong named library
accessible to the .net framework. But when I try and use it's objects
on most all it get is "equals" or "ReferenceEquals." I don't have
Navigate Object.

I need help. Please. All I want to do is load a url in the IE
instance whose window I am in. Thank you.

C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>sn
-k Sam
eBars.snk

Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Key pair written to SampleBars.snk

C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>tlbimp
Samp
leBars.dll /keyfile:SampleBars.snk /out:Interop.SampleBarsLib.dll
/namespace:Sam
pleBarsLib
Microsoft (R) .NET Framework Type Library to Assembly Converter
1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

TlbImp error: The input file
'C:\Temp\.net\code\Bands\dotnetBandObjects_src\Sam p
leBars\bin\Release\SampleBars.dll' is not a valid type library

C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>tlbimp
SHDo
cVw.dll /keyfile:SampleBars.snk /out:Interop.SHDocVwLib.dll
Microsoft (R) .NET Framework Type Library to Assembly Converter
1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Type library imported to
C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBar
s\bin\Release\Interop.SHDocVwLib.dll

C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>I'm not understanding what you are trying to accomplish. Would you mind
re-explaining. I went to the link you posted and couldn't see any thing
relevant to what you were explaining.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"jm" <john_20_28_2000@.yahoo.com> wrote in message
news:c67e4bdd.0405261139.50a2bb71@.posting.google.c om...
>I am trying to do something VERY simple. I want to use this:
> http://www.codeproject.com/csharp/d...7553#xx714692xx
> to point to a web page.
> I cannot use process.start because it opens the webpage in the last
> opened IE window, not the window which is currently active. So, I am
> trying to use the Microsoft Internet Controls COM.
> I found out that I cannot simply add the COM reference and compile
> it's objects. It wanted a strong name.
> Being very new the below was the best I could do.
> Best I can tell I made Interop.SHDocVwLib.dll a strong named library
> accessible to the .net framework. But when I try and use it's objects
> on most all it get is "equals" or "ReferenceEquals." I don't have
> Navigate Object.
> I need help. Please. All I want to do is load a url in the IE
> instance whose window I am in. Thank you.
> C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>sn
> -k Sam
> eBars.snk
> Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
> Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> Key pair written to SampleBars.snk
> C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>tlbimp
> Samp
> leBars.dll /keyfile:SampleBars.snk /out:Interop.SampleBarsLib.dll
> /namespace:Sam
> pleBarsLib
> Microsoft (R) .NET Framework Type Library to Assembly Converter
> 1.1.4322.573
> Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> TlbImp error: The input file
> 'C:\Temp\.net\code\Bands\dotnetBandObjects_src\Sam p
> leBars\bin\Release\SampleBars.dll' is not a valid type library
> C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>tlbimp
> SHDo
> cVw.dll /keyfile:SampleBars.snk /out:Interop.SHDocVwLib.dll
> Microsoft (R) .NET Framework Type Library to Assembly Converter
> 1.1.4322.573
> Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> Type library imported to
> C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBar
> s\bin\Release\Interop.SHDocVwLib.dll
> C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release
Essentially, when one uses a COM object, in a .net application, it
doesn't have a Strong Name. I don't know what it wants me to do.
MSDN is so complex that I can't put it together. It claims VS .NET
will do it for me, but I can't figure it out. I also do not see the
relationship between a .snk keyfile, my solution that I am bulding and
how to put them together to get that keyfile so that I have a strong
name for my COM objects I am using.

It really doesn't have to be about the bandobjects, that is simply
where I first encountered the error because the Microsoft Internet
Control doesn't have a strong name;

Thinking back, and I apologize, the MS Inet control COM object really
doesn't have anything to do with the article. I was simply adding the
COM object to the project below to make the bandobject be able to
navigate to web pages, etc. instead of simply displaying a message
box.

I guess I don't really know what a Strong Name is.

BTW, process.start will not work properly as it always uses the last
session of IE open and not the current session the user is in, thus my
need for the COM object (I am not asking for help here, just giving
background.)

Thanks for all your help.

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:<Oe9U8e6QEHA.3944@.tk2msftngp13.phx.gbl>...
> I'm not understanding what you are trying to accomplish. Would you mind
> re-explaining. I went to the link you posted and couldn't see any thing
> relevant to what you were explaining.
> --
> Regards,
> Alvin Bruney
> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
> Got tidbits? Get it here... http://tinyurl.com/27cok
> "jm" <john_20_28_2000@.yahoo.com> wrote in message
> news:c67e4bdd.0405261139.50a2bb71@.posting.google.c om...
> >I am trying to do something VERY simple. I want to use this:
> > http://www.codeproject.com/csharp/d...7553#xx714692xx
> > to point to a web page.
> > I cannot use process.start because it opens the webpage in the last
> > opened IE window, not the window which is currently active. So, I am
> > trying to use the Microsoft Internet Controls COM.
> > I found out that I cannot simply add the COM reference and compile
> > it's objects. It wanted a strong name.
> > Being very new the below was the best I could do.
> > Best I can tell I made Interop.SHDocVwLib.dll a strong named library
> > accessible to the .net framework. But when I try and use it's objects
> > on most all it get is "equals" or "ReferenceEquals." I don't have
> > Navigate Object.
> > I need help. Please. All I want to do is load a url in the IE
> > instance whose window I am in. Thank you.
> > C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>sn
> > -k Sam
> > eBars.snk
> > Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
> > Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> > Key pair written to SampleBars.snk
> > C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>tlbimp
> > Samp
> > leBars.dll /keyfile:SampleBars.snk /out:Interop.SampleBarsLib.dll
> > /namespace:Sam
> > pleBarsLib
> > Microsoft (R) .NET Framework Type Library to Assembly Converter
> > 1.1.4322.573
> > Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> > TlbImp error: The input file
> > 'C:\Temp\.net\code\Bands\dotnetBandObjects_src\Sam p
> > leBars\bin\Release\SampleBars.dll' is not a valid type library
> > C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>tlbimp
> > SHDo
> > cVw.dll /keyfile:SampleBars.snk /out:Interop.SHDocVwLib.dll
> > Microsoft (R) .NET Framework Type Library to Assembly Converter
> > 1.1.4322.573
> > Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> > Type library imported to
> > C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBar
> > s\bin\Release\Interop.SHDocVwLib.dll
> > C:\Temp\.net\code\Bands\dotnetBandObjects_src\Samp leBars\bin\Release>

Please Help Me, I Am to Be Fired!

What I ask can be very familiar to most of you.
So, please don't point me a URL in MSDN,
I can't understand the stuff there. Instead please add
the "lacking" codes and help me to complete the code.

I need to store First Name and Last Name of users
which come as user inputs through text boxes in
a web form to an existing data table as a new data row.

I used DataSets. I heard it is bulky. Is there any other
way of achieving it? I have included the database
connection in a method that is called for the click
event of the submit button. Instead, Should I include
it in the Page load event?

I also want to know weather there is a way to give
relative paths for database connection instead of
an absolute one which won't be practical when
I move the stuff to a web server.

Below I have included the complete code even with
HTML. The error I get is "Update requires a valid
InsertCommand when passed DataRow collection
with new rows"

It occurs due to the statement,
objCmd.Update(ds, "contacts")

Please help me to complete the code. I am a
trainee and this is a practice project that
I should submit. I couldn't complete it for
2 weeks. I made forum posts and got MSDN
links. Please don't do that. Just tell me what code
to where I should add. I really appreciate your
help. Here is the code,

<%@dotnet.itags.org. Page Language="VB" Debug="true" %>
<%@dotnet.itags.org. Import Namespace="System.Data" %>
<%@dotnet.itags.org. Import Namespace="System.Data.OleDb" %>

<script runat="server">

sub Add(obj as object, e as EventArgs)

dim objConn as new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\users\database\users.mdb")
objConn.Open()

dim objCmd as new OleDbDataAdapter("select * from contacts", objConn)
dim ds as DataSet = new DataSet()
objCmd.Fill(ds, "contacts")

dim dr as DataRow = ds.Tables("contacts").NewRow()
dr(1)=txtFirstName.text
dr(2)=txtLastName.Text
ds.Tables("contacts").Rows.Add(dr)

objCmd.Update(ds, "contacts")

objConn.Close()

end sub

</script>

<html>
<body>

<form runat="server">
<table width="100%" border="0" cellspacing="0" cellpadding="10">

<tr>
<td width="40%" align="right"><strong>First Name</strong></td>
<td width="60%">
<asp:textbox ID="txtFirstName" runat="server" />
</td>
</tr>

<tr>
<td align="right"><strong>Last Name</strong></td>
<td>
<asp:textbox ID="txtLastName" runat="server" />
</td>
</tr>

<tr align="center">
<td colspan="2">
<asp:button ID="btnAdd" runat="server" OnClick="Add" Text="Add" />
</td>
</tr>
</table>

</form>

</body>
</html>You could use a datareader instead of a dataadapter, it's slightly more code but a lot faster.
You can use server.mappath("/my.mdb") to connect to a relative path.
It's all in the error "Update requires a valid InsertCommand when passed DataRow collection with new rows". You've only given the dataadapter a select command so it doesn't know how to insert,update or delete.
After

dim objCmd as new OleDbDataAdapter("select * from contacts", objConn)

add

Dim cb as New OleDbCommandBuilder(objCmd)

These concepts are really simple and to be harshly honest, if you can't understand it, perhaps programming isn't really for you. Then again if you're going to get fired as you say, you shouldn't care. :D