|
To display data in DataGrid.
I have created DAL for oracle database
Ex: Getdata
Which has query
Ex: select * from countrymst
Then I have created a BAL for that method Getdata
Then I will map BAL to dataGrid
Ex:
Datagrid.datasource = Businesslogic.method();
We I do same thing using XML. So how do same functionality using XML.
What are the procedures / step I should do?
vijaya
|
|
|
|
|
Hi,
"Using XML" term is really confusing.
Can u tell me what "Businesslogic.method()" method returns?
From my experience I can tell u following.
We had created our whole database in xml files and we read those files using DataSet and bind datatables in to datasets to datagrid/gridview.
We also used classes of System.XML namespace to retrieve from and to save data to the xml files.
You please specify your requirement clearly.
1. Do u want to convert your data coming from oracle into XML before binding to the datagrid?
2. Do u want to know how to develope database using xml files?
3. Do u want to know how to use classes of System.XML namespace.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
I want to convert data coming from oracle into XML before binding to the datagrid?
Thank you
vijaya
vijaya
|
|
|
|
|
|
I have a detail view like this
feild1 *****
feild2 *****
feild3 ******
feild4 *******
can i make like this
feild1 ********* feild2 **********
feild3 ******** feild4 ********
can i do this and how?
|
|
|
|
|
Hi
You can display like that using DataList control and use properties like
RepeatLayout="Table"
RepeatColumns="2"
Harini
|
|
|
|
|
Thanks for the reply. But details view is binding from the selected row from datagrid. using repeater control can we bind the data from the selected row of datagrid
|
|
|
|
|
Nope. You can't do that .. You need to format details view like table format .. Try to add table tag inside details view using templatefield or ItemTemplate.
Harini
|
|
|
|
|
HI
In pageLoad of asp.net app i am getting the variables as
string m=strPart ; (m="1" getting this)
string k ;
k=Convert.ToString(Session["impath"]); (k="pg/photo")
now i want to take string ppath as "pg/photo/sample(this is folder name)/1.jpg"
my code is
string ppath=" ' + k + ' "/"sample"/" ' + m + ' ".jpg;
but i am getting the erroe as operator " / " can't be applied for operands of type string and string
plz help me
thanks in advance
Haritha
Haritha
|
|
|
|
|
Hi,
I think ur ppath should be assigned like following.
string ppath="'" + k + "'/sample/'" + m + ".jpg";
I hope this will help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
string ppath="'" + k + "'/sample/'" + m + ".jpg";
i have changed like this too but i am getting the same error
Haritha
|
|
|
|
|
string ppath=k + "/sample/" + m + "/.jpg";
DAsh04
|
|
|
|
|
i have tried like this it is not working
Haritha
|
|
|
|
|
string ppath=k + "//sample//" + m + "//.jpg";
DAsh04
|
|
|
|
|
I tried with this code its working fine
<br />
Session["impath"]="C:/FilesForXml/Photo/";<br />
string m="1";<br />
string k = Session["impath"].ToString();<br />
string path = k +"Sample/" + m + ".jpg";<br />
Are you trying to store the file ?
Debug your application and see what is the value of ppath .
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
string m=strPart ; (m="1" getting this)
string k ;
k=Convert.ToString(Session["impath"]); (k="pg/photo")
now i want to take string ppath as "pg/photo/sample(this is folder name)/1.jpg"
string ppath=" ' + k + ' "["sample"}" ' + m + ' ".jpg;
rhh
|
|
|
|
|
what is the different between session and context..in which all situation i can use context??
|
|
|
|
|
Both are used for accessing information between pages. But context provides access to the entire current context including request, object.
|
|
|
|
|
Hi
In asp.net page load i used one variable p that contains value as
string p="ls2";
now i want to get the "2" from ls2 into another variable
how to write code for this?
plz help me
thanks in advance
Haritha
|
|
|
|
|
is "2":
the third character in the string
the numeric part
the last character
everything that's not the first 2 characters
what would happen with an input such as x5 or r2d2?
Russ
|
|
|
|
|
String a= p.Substring(2,1)
will give "2"
store it in a variable
to convert into numeric
b= int.Parse(a);
vijaya
|
|
|
|
|
I have created procedures which is written in oracle.
How to use it in asp.net. In DAL neither create stored procedure nor exiting procedure is active.
How to call it? Is it possible to map to Gridview ? How to pass parameters to it?
Thank you
Vijaya
vijaya
|
|
|
|
|
.NET has dedicated classes for accessing Oracle databases, try googling for more info
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i have a datalist template hyperlink..if i click on tat i have to pass a query string to the response page...
the query string is a dynamic one...
for eg if im displaying a user name n password in the datalist i have to pass userid as querystring of the corresponding selected username..
how can i do tat??\plz help me out.
|
|
|
|
|
Hi,
I could not find any direct way to do this.
But u can use ItemDataBound event of datalist.
U need to put hyperlink in datalist ItemTemplate without setting its NavigateUrl property.
This property u can set at runtime while datalist it bound to the datasource.
Your hyperlink should be like following.
<asp:HyperLink ID="HyperLink1" runat="server"></asp:HyperLink>
I have put one label control which will have the value which we want make querystring.
I have set its visible property = false;
<asp:Label ID="lblusernamehidden" runat="server" Text='<%# Eval("username") %>' Visible="false"></asp:Label>
now I am setting hyperlink's navigateurl property in ItemDataBound event of datalist.
protected void dlst_ItemDataBound ( object sender, DataListItemEventArgs e )
{
HyperLink hl = ( HyperLink )e.Item.FindControl( "HyperLink1" );
Label lbl = ( Label )e.Item.FindControl( "lblusernamehidden" );
if ( hl != null && lbl != null )
{
hl.NavigateUrl = "~/TargetPage.aspx?username=" + lbl.Text;
}
}
this way you can get querystring dynamically in hyperlink.
also set Datalist's OnItemDataBound property to "dlst_ItemDataBound".
I hope this will help you.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|