|
hi..
i have a DataTable dt width data
Id Price
1 250
2 200
3 300
DataSet ds = new DataSet();
ds.Tables.Add(dt);
XmlDataDocument x = new XmlDataDocument(ds);
and a procedure in sql server 2005
create procedure Sproc_Select_Xml(@x xml)
AS
BEGIN
DECLARE @data TABLE(Id bigint,Price numeric)
INSERT INTO @data(Id,Price)
SELECT xmlVals.rowvals.query('Id').value('.','bigint'),
xmlVals.rowvals.query('Price').value('.','numeric')
FROM @x.nodes('/ds/dt') as xmlVals(rowvals)
SELECT * FROM @data
END
when i pass xml document to proc
i get the error
System.ArgumentException: No mapping exists from object type System.Xml.XmlDataDocument to a known managed provider native type.
|
|
|
|
|
The error means what it says. Don't pass in the XML document, pass in the XML.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
yep u right thanx
i need to pass
ds.GetXml ()
|
|
|
|
|
I have a gridview in an updatepanel (I need this for a partial page postback on sort and paging). I also have a buttonField in my gridview and a panel(div) outside the updatepanel.
How do I hide and show the panel when the buttonField is clicked? My code works without the updatepanel but does not work with the updatepanel. I'm obviously missing something. Any help would be greatly appreciated.
My code structure below:
<asp:UpdatePanel ID="updPnlEmployee" runat="server">
<ContentTemplate>
<asp:GridView ID="grdVWEmployee" runat="server" AllowPaging="True" AllowSorting="True" PageSize="50" AutoGenerateColumns="False" DataKeyNames="Employee_ID" DataSourceID="odsEmployee" OnRowDataBound="grdVWEmployee_RowDataBound" OnRowCommand="grdVWEmployee_RowCommand">
<Columns>
<asp:BoundField DataField="First_Name" HeaderText="First Name" SortExpression="First_Name"/>
<asp:BoundField DataField="Last_Name" HeaderText="Last Name" SortExpression="Last_Name"/>
<asp:ButtonField Text="Eligibility" CommandName="Eligibility" CausesValidation="false"/>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:Panel ID="pnlGrid" runat="server" CssClass="detail" width="500px" style="display:none">
</asp:Panel>
CODE BEHIND:
protected void grdVWEmployee_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Eligibility")
{
this.pnlGrid.Visible = true;
}
}
|
|
|
|
|
use after
<triggers><asp:postbacktrigger controlid="pnlGrid" xmlns:asp="#unknown">
|
|
|
|
|
Hi,
Thanks for your response, I tried your suggestion but I got the following error:
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Type 'System.Web.UI.PostBackTrigger' does not have a public property named 'xmlns:asp'.
|
|
|
|
|
I finally got this to work.
I changed the field into a template field and created a LinkButton.
OnRowCreated, I registered the button as a postback control.
protected void grdVWEmployee_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//Retrieve Item Number column and register button as normal postback
LinkButton btnEligibility = (LinkButton)e.Row.FindControl("btnEligibility");
ScriptManager sm = ScriptManager.GetCurrent(this);
if (sm != null)
{
sm.RegisterPostBackControl(btnEligibility);
}
}
}
|
|
|
|
|
Hello guys!
can anybody give me a list of projects that are deeloped using share point technology.so that I'll practise the microsoft office share point.
thank you
valli
valli
|
|
|
|
|
valli rajya lakshmi wrote: can anybody give me a list of projects that are deeloped using share point technology.so that I'll practise the microsoft office share point.
You should do a simulation of the US economy with the addition of the stimulus package so that we can all see what will happen.
|
|
|
|
|
Just stop now. I'm still laughing and giggling - if anyone walks by my cube they're going to think I'm clinically insane!
|
|
|
|
|
We are looking either an ASP.NET web toolkit or someone who can assist us for the handling images within a SQL Server database and displaying them. We do not need editing, conversion, PDF. Does anyone know of a ASP.NET DLL toolkit that will do this. More on the requirements below.
We would like to create a web application in ASP.NET for doing web based training for State employees. The concept is to have a set of Courseware pages that the creators of the training content can insert images and text into. Then the students (State employees) will be able to view the images and text from a web browser and takes the courses.
The images for the training content are going to be clipboarded using a very popular and State supported package called SnagIt from TechSmith. From what we understand the native clipboard format for SnagIt is PNG. We do not want to save the snag’ed images to files. The SnagIt product has a wonderful virtual clipboard that eliminates all of the issues with saving images to files and remembering the names later.
The images that are captured using SnagIt and clipboarded will be stored in a SQL Server 2005 database in either an (Image) or (VarByte) data typed column. We do not want to use saved image files with links to the files defined in the SQL Server database and then manage the transfer of the images files between the courseware creator and the web server. Our goal is to simplify the courseware creation using the supported environment and tools (SnagIt).
Our research indicates that you can not write ASP.NET web code that uses the windows clipboard because of security concerns. Many Google’d pages indicate this can only be done with a 3rd party DLL or Active-X components. The State does not allow Active-X but will allow a DLL within the web application.
We have created a test platform with a SQL Server 2005 database and the table with the (Image) data type column in it. We can Snag images and clipboard them into the image column using an MSAccess simple form linked to the database. We can then page through the images using the MSAccess form. We are trying to avoid having to use MSAccess for the courseware development part of this application. We really want the entire solution to be web-based.
Even with the MSAccess form and saved images in the SQL Server 2005 database we can not get a web page to just display the images from the database. We have a number of posting in the ASP.NET forum in an effort to resolve this. We have tried HTTP Handler, byte arrays, memory streams, etc to no avail. We think the issue has to do with us clipboarding the image from SnagIt and how it’s saved using MSAccess. Again we want to avoid any MSAccess in this solution.
We have started research on 3rd party toolkits but so far all of them are for heavy duty image processing, editing, etc. We need a simple data bindable image control for SQL Server 2005.
John H Schuster
Consultant
Phoenix Workgroup COmputing LLC
(517) 927-7400
|
|
|
|
|
John Schuster wrote: The State does not allow Active-X but will allow a DLL within the web application.
The state is then stupid, they end up being the same thing :P
What you need should be easy to write, it's just a bit of code that runs in a web page, and grabs an image from the clipboard, and sends it through to the server.
Here's a thought. The client is running snagit and needs to send you their screenshots, right ? Why does this have to be a web app ? Why not a client side app that sends the images to a webservice or something ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi there,
I am in a problem..like i have one gridview and the DataKeyNames is say "ID"
i have one imagebutton field for changin the status of a customer in that image button i setup one commandargument field say "StatusValue"..and the CommandName is Status...
when i click status button ie, in the "GridView1_RowCommand" event i need both the values ie ID and StatusValue corresponding to that row....
Can anybody give me a help to solve this...
i am using asp.net 2.0 and c#
|
|
|
|
|
Use the gridviews rowdatabound event.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button Button1 = (Button)e.Row.FindControl("Button1");
DataRowView drv = (DataRowView)e.Row.DataItem;
Button1.attributes.add("id", dvr["id"].tostring());
}
}
I didn't get any requirements for the signature
|
|
|
|
|
hi
thanks for your response..but i coudn't able to come up with a result...i set the attributes with id value
but how can i retrieve those values...now i have command arguemnet in image button and the id value is in imagebutton's ID value..so how can i retrieve those values in row command u have any idea.
regards
alex.
|
|
|
|
|
Button button1 = (button)sender;
button1.attribute["ID"].value ?
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
No that's not possible..because gridview is the sender....because image button is inside the gridview..i tried but it makes error....
regards
alex
|
|
|
|
|
Sorry, I guess I usually used an item template column.
You should still be able to determine the gridviewrow and use its findcontrol method. If that doesn't work you could pass both values as the command argument and use string.split. I'm sure you can figure it out.
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
Thanks man finally it works..i used both values in the command arguement and split it out...
thanks once again.
regards
alex.
|
|
|
|
|
r widgets and webparts same ?
plz help me...........
|
|
|
|
|
Yes, a WebPart is a Widget, created for ASP.NET, MOSS...
Calin
|
|
|
|
|
To create a webpart, in Toolbox, go under WebParts tab and use WebPartManager and WebPartZone and add something to it, or by inheriting from System.Web.UI.WebControls.WebParts.WebPart class and override CreateChildControls() to add controls.
Calin
|
|
|
|
|
thank u calin,
can u plz suggest any link to develop widgets
|
|
|
|
|
Hi all,
I have a treeview control, loading data using an xml file, and have a trigger [TreeView1_TreeNodePopulate] in the codebehind. Don't know for some reason it is not getting fired. Even though I'm raising an error in my trigger, it seems it doesn't work.
Could anyone help me find this PLEASE?
Here is my aspx:
<asp:treeview id="TreeView1" runat="server" datasourceid="BookXmlDataSource" xmlns:asp="#unknown">
<databindings>
<asp:treenodebinding datamember="Book" textfield="Title" />
<asp:treenodebinding datamember="Chapter" textfield="Heading" />
<asp:treenodebinding datamember="Section" textfield="Heading" />
</databindings>
</asp:treeview>
<asp:xmldatasource id="BookXmlDataSource" xmlns:asp="#unknown">
DataFile="Book.xml"
runat="server">
</asp:xmldatasource>
codebehind:
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
TreeView1.TreeNodePopulate += new TreeNodeEventHandler(TreeView1_TreeNodePopulate);<br />
}<br />
<br />
protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)<br />
{<br />
throw new Exception("alsdjfla");<br />
}<br />
Thanks A LOT.
Muthu
|
|
|
|
|
set PopulateOnDemand = true
Calin
|
|
|
|