|
>Hi Friends.
I am putting datalist in the edititemtemplate of the datagrid.After then some part of the datalist code (placed in the edititemtemplate of the datagrid)is not executing.I am placing the datalist in the edititemtemplate of datagrid.
-----------------------------------------------------------
I am using the following code.
-------------------------------------------------------------
<asp:DataGrid id="dg1" runat="server" Width="392px" Height="144px"
AutoGenerateColumns="False"
AllowPaging="True" PageSize="5">
--------------------------------------------------
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<TABLE width="100%">
<TR>
<TD width="70%">Deposit Types
</TD>
<TD align="center" width="15%">Edit
</TD>
<TD align="center" width="15%">Delete
</TD>
</TR>
</TABLE>
</HeaderTemplate>
------------------------------------------------------------
<ItemTemplate>
<TABLE width="100%">
<TR>
<TD><%#Container.DataItem(1).ToString()%></TD>
<TD align="center" width="15%">
<asp:ImageButton id="edit" ImageUrl="images/edititem.gif" CommandName="edit" Runat="server"></asp:ImageButton></TD>
<TD align="center" width="15%">
<asp:ImageButton id="Imagebutton1" ImageUrl="images/cross.gif" CommandName="delete" Runat="server"> </TR>
</TABLE>
</ItemTemplate>
-----------------------------------------------------------------------
<EditItemTemplate>
<TABLE id="edititem" width="100%">
<TR>
<TD width="100%">
<asp:DataList id="dl1" Runat="server">
<ItemTemplate>
<table width="100%">
<tr>
<td width="30%">
<%#FindAttribute(Container.DataItem(0).ToString())%>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList></TD>
</TR>
</TABLE>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
<pagerStyle Mode="NumericPages"></PagerStyle>
</asp:DataGrid>
Please help.
-- modified at 1:42 Saturday 15th July, 2006
|
|
|
|
|
I am developing a billing system. I'm having tables including packages and invoices. The packages are created for each invoices.
How can i renew the packages? For example one package is monthly plan and the second one is yearly plan. How can i renew the monthly plan package and generate an invoice for that package. This must also helps to track the invoice & package details.
I'm very much confused please help me!
|
|
|
|
|
|
Good day to all.
I got a problem to bind a data into datagrid in asp.net.
My problem is, i got several way to key in the data to search the relevant data to be bind in the datagrid.
Such as i got 3 textbox provide for the user to key in the input data, and how do i need to use this different data to filter out the most accurate data to be bind in the datagrid.
Can anyone give me a solution to solve this problem. If got sample code would be more better.
Thanks and have a nice day.
Best Regards,
Pei Sun
|
|
|
|
|
|
What?! No C# example?
"The key, the whole key, and nothing but the key, so help me Codd"
|
|
|
|
|
Hi there,
This is a gud site datagridgirl.com for you to learn how to bind data to datagrid...
<< >>
|
|
|
|
|
Hi Everyone!
I have a proplem of connection string to connect database
I have a SQL server, thi Name server this MSSQLxxx; (Not Local)
User: Xman;
Pass: Xmankk;
DataBase: TLxxx;
Now, I Dev a website in .Net 1.x & SQLSERVER 2000.
I use a connection string:
"user id=Xman;pwd=Xmankk;data source=MSSQLxxx;initial catalog=TLxxx;timeout=90"
But, can not connect to database.
I try doing connect to the database by tool of sqlserver 2000, it is sucessful, I can view all information of the data (TLxxx), I can view Tables, views ,... I can Create table there.
This is the my code:
public class UserDB
{
private string connectionString;
public UserDB()
{
// I try Hardcode to test connection string.
connectionString = "user id=Xman;pwd=Xmankk;data source=MSSQLxxx;initial catalog=TLxxx;timeout=90";//ConfigurationSettings.AppSettings["connectionString"];
}
public int GetUserID(string userName, string pass)
{
SqlConnection con = new SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand("TL_GetUserID", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@userName", SqlDbType.NVarChar,50));
cmd.Parameters["@userName"].Value = userName;
cmd.Parameters.Add(new SqlParameter("@password", SqlDbType.NVarChar,32));
cmd.Parameters["@password"].Value = pass;
try
{
con.Open();
SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow);
if (reader.Read())
{
return Convert.ToInt32(reader["UserID"]);
}
else
{
return -1;
}
}
catch(SqlException)
{
throw new ApplicationException("data ");
}
finally
{
con.Close();
}
return -1;
}
....
}
Please, show me solution.
Many Thank.
I Don't Want Say No Wealth
|
|
|
|
|
Just wonder what the expection you got?
<< >>
|
|
|
|
|
Hi.. good day to all.
I got a question about how to print report in the web page using asp.net(vb script). Can anyone provide some solution to guide me solve this problem. If got the solution, can you provide me some sample code as well. Thanks.
Best Regards,
Pei Sun
|
|
|
|
|
using window.print() method...I'm not sure this is also the same as in VB Script
<< >>
|
|
|
|
|
How I retrieve this? By example, 3 users are on-line, then have 3 sessions active. I wish get info about this sessions.
Regards
Jesus is Love! Tell to someone!
|
|
|
|
|
IMO, you just store the session info into an application-level variable...you can access them then...
<< >>
|
|
|
|
|
I'm trying to build my first web site using vs2005 and I get an error when vs builds the site :
Error 1C:\Documents and Settings\MyComputer\My Documents\Visual Studio 2005\WebSites\WebSite8\Default.aspx: ASP.NET runtime error: Could not load file or assembly 'System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config line 62) C:\Documents and Settings\MyComputer\My Documents\Visual Studio 2005\WebSites\WebSite8\Default.aspx 1 1 C:\...\WebSite8\
I don't know how to solve it
Can anyone help me?
modified 30-Nov-21 21:01pm.
|
|
|
|
|
This seems to be a problem with the order of installation. Did you have any VS2005 betas installed on your machine? I remember an order for uninstalling VS2005 betas that was published by Microsoft. Try building your application on another machine and see if it works.
salutari,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
mihaila mihai wrote: 'System.Runtime.Serialization, Version=3.0.0.0,
Isn't that a framework 3.0 (WinFX) version?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hello there is a problem. I use TreeView controll as a data source giving a class that implements
IHierarchicalDataSource interface with method HierarchicalDataSourceView GetHierarchicalView(string myPath)
Under the big structure of next and next classes there is:
class MyNode : IHierarchyData
I put objects of this class into
class Enumerable : List<mynode>, IHierarchicalEnumerable
Enumerable know myPatch value and using some QueryService static class asks about the structure of the tree.
Enumerable( string _patch ) creates collection of children for node specified by _patch
There is a problem::::
The "shape" of the tree (parents, children) is as expected but i don't know where to set Text displayed by the node. IHierarchyData doesnt't contain information abuut the text - only obout patch and the children. Where to put this information. At praesent every Node has text: "MyNode" which as I think was generated automatically.
MyNode looks like this:
public class MyNode : IHierarchyData
{
// children - does it heve any children
// jako type - i give here a name of specyfied node
// patch - if we haveroot->parent->child1, patch looks like this: "/root/parent/child1"
public MyNode(string path, bool children, string type)
{
DelimiterArray = new char[1];
DelimiterArray[0] = '/';
NodeValues = path.Split(DelimiterArray);
_Path = path;
_HasChildren = children;
_Type = type;
_Text = "Ufo";
_Value = "Delphin";
}
#region IHierarchyData Members
char[] DelimiterArray; // see constructor
string[] NodeValues; // see constructor
public IHierarchicalEnumerable GetChildren()
{
return new Enumerable(_Path);
}
public IHierarchyData GetParent()
{
throw new Exception("The method or operation is not implemented.");
}
string _Text;
public string Text
{
get { return _Text; }
set { _Text = value; }
}
string _Value;
public string Value
{
get { return _Value; }
set { Value = value; }
}
bool _HasChildren;
public bool HasChildren
{
get { return _HasChildren; }
}
public object Item
{
get { return this as object; }
}
string _Path;
public string Path
{
get { return _Path; }
}
string _Type;
public string Type
{
get { return _Type; }
}
#endregion
}
Thanks, Paul Poland
-- modified at 16:15 Friday 14th July, 2006
|
|
|
|
|
Can someone tell me how to use a datalist pls?? the datalist isn't appearing when i am dragging it into the form like the datagrid. why is this??
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
are you using composite datalist control or a normal .net control
Deepak
|
|
|
|
|
During runtime if there is no data in the datalist , then i am afraid u will not be able to see datalist control on the page, unless u modify the header or the footer template.
Deepak
|
|
|
|
|
hi,
I am using Postgres as database ,
I have a search.aspx page in which the user create a SQL query and submit the page.
I want to display the data in the reportViewer control in asp.net 2.0 using c# as my script
NOTE : the data will be displayed dynamically base upon the query made by the user in the search page.
Please help me out in this .
I am not much aware of the report viewer control but i have to display data dynamically
Deepak
|
|
|
|
|
Using vs2005
ok folks, i am currently using a dataset that pulls data from sql server database and wish to show the final results in a label.
Database Name: miniCMS
From Table: Page
Column: PageID that equals 1
Hope this helps you answer my question.
Please point me in the right direction or even show me how to do this.
Thanks in advanced
-- modified at 13:16 Friday 14th July, 2006
|
|
|
|
|
I did point you in the right direction in your previous post on another forum.
|
|
|
|
|
Yes Thank you - i posted here as i had realised the mistake i made regarding the category i put the post in.
Also i am very new could you please elaborate.
Thank you
|
|
|
|
|
I want to use asynchronous socket on my asp.net page 2.0. Here is the problem: When the user click on a button, I need to launch a socket to connect to another machine on another network to process data (this could take 2-3 minutes). I build my own asynchronous socket class and it work fine on desktop application, but how do I use it in asp.net page. Since the processing of data can take as least 2 minutes, I do not want to freeze the user. I search everywhere but found no solution. Any help will be appreciated.
Rookie Programmer
|
|
|
|