|
Hi,
I am not able to pass a form field value to a storedprocedure in detailsview. I am getting an error message. I couldn't figure out what is causing the problem. If you help me to solve it, I would really appreciate it.
The detailsview code is shown below also the stored procedure. The error message is:
"Procedure or function 'StoredProcedure1' expects parameter '@GetActivityName', which was not supplied. "
Thank you.
<br />
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" <br />
BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" <br />
CellPadding="3" CellSpacing="1" <br />
DataSourceID="SqlDataSource1" DefaultMode="Insert" GridLines="None" <br />
Height="50px" Width="125px"><br />
<FooterStyle BackColor="#C6C3C6" ForeColor="Black" /><br />
<RowStyle BackColor="#DEDFDE" ForeColor="Black" /><br />
<PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" /><br />
<Fields><br />
<asp:BoundField DataField="ActivityName" HeaderText="ActivityName" <br />
SortExpression="ActivityName" /><br />
<asp:CommandField ShowInsertButton="True" /><br />
</Fields><br />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /><br />
<EditRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /><br />
</asp:DetailsView><br />
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayDBConnectionString %>" <br />
InsertCommand='StoredProcedure1' InsertCommandType="StoredProcedure"><br />
<InsertParameters><br />
<asp:Parameter Name ="ActivityName"/> <br />
<asp:Parameter Size ="50" Direction ="ReturnValue" Name="GetActivityName" /> <br />
<br />
</InsertParameters><br />
</asp:SqlDataSource><br />
STORED PROCEDURE 1
<br />
ALTER PROCEDURE dbo.StoredProcedure1 <br />
(<br />
@GetActivityName nvarchar(50)<br />
) <br />
AS<br />
<br />
BEGIN<br />
<br />
INSERT INTO activities VALUES (@GetActivityName)<br />
<br />
END<br />
<br />
RETURN<br />
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
in my project at one place sthing like this is been writen
SetHistoryHandler(
{
ScreenId: SCREEN_CONTACTS,
Entity: PART_NEW_GROUP, Contacts: contacts
}
);
i coule not understand what does this ':' doing when passing arguments for ex. one argument is Entity: PART_NEW_GROUP ,it contain ':' after Entity
Raghvendra
|
|
|
|
|
That is a Javascript object literal. It is similar to an array list, except the members are enclosed in curly brackets and each member is defined explicitly with a name, followed by a colon, and each member is separated with a comma, not a semi-colon. Once an object literal has been defined, then each member can be accessed with Object literal variable name.Member name
For example, if you do this:
var fruit = {apples: 1,
bananas: 2,
oranges: 3,
grapes: 20
};
This creates an object with the members apples, bananas, oranges and grapes with values of 1, 2, 3 and 20 respectively.
The members can be accessed like so:
fruit.apples;
fruit.bananas;
fruit.oranges;
fruit.grapes;
Object literals are especially useful in argument lists, as it means that the arguments don't have to all be present, or have a set order to be defined in.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
modified on Sunday, September 21, 2008 2:57 AM
|
|
|
|
|
Thanks,
now i cam corelate it in project
Raghvendra
|
|
|
|
|
i get it that
SetHistoryHandler(
{
ScreenId: SCREEN_CONTACTS,
Entity: PART_NEW_CONTACT
}
);
var fruit = {apples: 1,
bananas: 2,
oranges: 3,
grapes: 20
};
sounds bit differ
in my one
{
ScreenId: SCREEN_CONTACTS,
Entity: PART_NEW_CONTACT
}
does not sounds some thing like anonimeous structure means it does not have any name so we can refer some where else
i mean i could not get it fully when i do compare it, alone it make full sence to me
Raghvendra
|
|
|
|
|
SCREEN_CONTACTS and PART_NEW_CONTACT appear to be variables, so the values of ScreenId and Entity take the value of these variables.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
|
hello evry body
i am beginner in asp.net(with c#) . Im going to get IP from users that see my site.
Thank you
|
|
|
|
|
try
String userIP = Context.Request.UserHostAddress;
Intelligence is almost useless for those who have nothing else!
Email: caiokf@gmail.com
|
|
|
|
|
I need to generate some controls dynamically.So i code as belows:
using System;
using System.Web;
...
namespace MyProject
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
TableRow row = new TableRow();
TableCell cell = new TableCell();
Button btn = new Button();
btn.ID = "btnCreated";
cell.Controls.Add(btn);
row.Cells.Add(cell);
this.Table1.Rows.Add(row);
btn.Click += btn_Click;
}
protected void btn_Click(object sender, EventArgs e)
{
this.TextBox1.Text = "test";
}
}
...
when i run it,the table(include the new button) can be show after i click the button1 .But when i click the new button(ID as btnCreated),it doesnt work.And the worse is the created table disappears after i click the new button.
How to solve it??
|
|
|
|
|
Dynamically added control have to be added each time the page is posted back
I think you must add them in the preinit event
Try that and see what happens
Alexei Rodriguez
|
|
|
|
|
thank you,I tried adding code in Preinit event,it really worked.
I still have some question,I need to add control by clicking the assigned button,but if i add this code in preinit event,it always add control whenever any button clicked.If i got 2 or more buttons on the page ,how to identify which button cause the adding event?
The second is,how to save the dynamically added control's property (for example:textbox) ,if i change the text of the textbox,after page posted,the dynamically added control re-builded,how can i get the changed text.
|
|
|
|
|
Hello all
I am displaying treeview in a dropdownlist using Ajax dropdownextendar control. But i am facing one problem.
When i click on "+" image in treeview for displaying subnodes then at that time page get post back and it again hide the treeview and when i click on dropdownlist then it shows me nodes and its subnodes.
As per the requirement when i click on "+" in treeview control image it should show me subnodes without postback.
Help Me
Thanks
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
|
Hi,
I currently have a site and I do have an SSL key, but I am not forcing the main page to be run in SSL. However, this main page has a few options that anonymous users can use as well as a login/password text box using ASP.NET's built in login functionality.
Is it possible for me to have it so that, when the user enters data into the username/password and submits it, it goes through SSL for the postback here regardless of if they are logging into the site via HTTPS or HTTP? I am trying to avoid forcing the main page to be always run in SSL and I am assuming that if I don't do anything and the user logs in over HTTP, their username/password is sent around in clear text.
Thanks,
Steve
|
|
|
|
|
wpisteve wrote: username/password is sent around in clear text.
You could always just use a one-way secured crypto hash of the password. Why not just use SSL?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
How about a box for the user's username which is on the main HTTP page which then goes to a separate HTTPS page where the user then enters their password which is then encrypted. I've seen banks do this with Internet banking, where the user enters an ID or other insensitive piece of data then they are redirected to an encrypted page to enter the sensitive information like sort code and security number.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
I want to provide a hyperlink reference for dynamicaly created image control
(suppose my controlname is img)
Got ? give...
|
|
|
|
|
Add the image control inside a hyperlink control or an
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='url'>
<asp:Image ID="img" runat="server" />
</asp:HyperLink></td>
Alexei Rodriguez
|
|
|
|
|
Hi,
I have my ASP.NET web application in C:\inetpub\wwwroot\NewsModule
Now in the production server, I need the files to in a News folder in the existing application, but the web.config should be outside this folder. In my application I am using relative path (~) to access user controls and style sheets. But when I uploaded these to production server and created a similar structure, I get the error "HTTP 404 , resource cannot be found"
What am I doing wrong here?
Regards,
Blumen
|
|
|
|
|
Can i change the position of the column. and
can i insert the new column in first position if table has been already created
|
|
|
|
|
Actually there is no good solution for this.
I think that if your application depends on the column order, its better for you to rethink your code. It's almost sure it will give you trouble in the future.
Even though, I think the easiest way to do that is to create a View, with the columns in tha order you want (but not for insert new column in different order...)
Intelligence is almost useless for those who have nothing else!
Email: caiokf@gmail.com
|
|
|
|
|
Can u plz help me to find out hw can i disable print button of crystal report which is placed in a child page.I want that only authorized users can take the printouts of reports.
thanks in advance....
Maniiiiiiiiiiiiiii
|
|
|
|
|
Perhaps Crystal Report provide property WindowShowPrintBtn . You can set true/false as your requirement.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
It has the property PrintatBottomofPage,sorry but i dont have much knowledge
about Reports can u plz elaborate me,i have to set print disable in my master page so hw can i access that print button in my master page....
thanks for ur reply...
Maniiiiiiiiiiiiiii
|
|
|
|