|
Hi,
I need to create a dynamic table list using ASP.NET C#.
The table has to output the following like image below.
http://img171.imageshack.us/img171/4706/tableoe5.jpg
The FUND 1, FUND 2, FUND 3 (and other funds), DATE, and the FUND PRICE (0.3330, 0.4930, and others) are fetch from database. All are DataBound into LABEL property.
If you notice, after FUND 4 the list repeat itself with header and start with FUND 5.
How can this be done.....Pls help....Pls share any ideas or example.
Thx.
|
|
|
|
|
It looks like you might want to try a gridview in a repeater. in the item databound event of the repeater, you can find and bind each grid.
|
|
|
|
|
hi,
Thx for reply.
but i'm new to asp.net, is there any example available with similar to my situation??
Thx.
|
|
|
|
|
|
Hi Friends,
I have created two functions that encrypt and decrypt the connection string in web.config. But whenever I want to use connection string. I have to always decrypt web.config and then again encrypt it back. Does there any other way which i can use.
I'm using section.SectionInformation.ProtectSection(" <encryption configuration="" provider=""> ") and section.SectionInformation.UnprotectSection()
|
|
|
|
|
R u changing(Enrypting/Decrpting) value of connection string in web config each time.
You just need to put encrypted connection string in web config and whenever you want to use it just fatch the encrypetd connection string, decrypt it and use it.
|
|
|
|
|
Hey guys below is a block of code I'm using to get data from my DataBase using a DataReader but after running the code the DataReader is empty tell what I'm I doing wrong. I'm using Microsoft.Practices.EnterpriseLibrary.Data to access my Database
Database dbuser = DatabaseFactory.CreateDatabase("Portal");
DbCommand cmd = dbuser.GetStoredProcCommand("GetPassword");
DbCommand cmdUpdate = dbuser.GetStoredProcCommand("UpdateLastActivityByEmail");
dbuser.AddInParameter(cmd, "Email", DbType.String, username);
dbuser.AddInParameter(cmd, "Password", DbType.String, EncryptData(password));
dbuser.AddInParameter(cmdUpdate, "Email", DbType.String, username);
dbuser.AddInParameter(cmdUpdate, "lastActivityDate", DbType.DateTime, DateTime.Now);
string pwd = "";
SqlDataReader dbrUsers = null;
dbrUsers = (SqlDataReader)dbuser.ExecuteReader(cmd);
try
{
if (dbrUsers.RecordsAffected > 0)
{
dbrUsers.Read();
pwd = dbrUsers.GetString(0);
}
}
catch(Exception e)
{
}
Please Help!
Index out of bound.
|
|
|
|
|
use it like below..
try
{
while(dbrUsers.Read());
{
pwd = dbrUsers.GetString(0);
}
}
catch(Exception e) { }
|
|
|
|
|
I still have to same problem, is it the way I'm accessing my database or is it the ExecuteReader() method?
Index out of bound.
|
|
|
|
|
Try
if (dbrUsers.Read())
{
//Set your password stuff
}
Also probably worth checking to see that you are actually returning a value from the SQL?
|
|
|
|
|
I want to select a folder in asp.net using c#. Using the fileUpload control I can select a file, but i want to select a folder from the machine.
Please help.
Thank you in advance.
|
|
|
|
|
You can do only by zip the folder options.
|
|
|
|
|
You'll have to roll your own control for this - don't think there is a built in option.
|
|
|
|
|
Hi , Can i put Lable or Any Other Control in GridView's HeaderTemplate ,
i put control in HeaderTemplate and find this Control but its not working
Code
Label labname = (Lable)(GridView1.Rows[i].FindControl("ControlName"));
now labname value show null with Error .
The same Conditon works fine if i use Control in ItemTemplate .
tell me the Solution .
|
|
|
|
|
You have to find that control after databinding
and when dataitembound event gets fired in that you will get row
if that rrow type is hederrow then you will get that control
|
|
|
|
|
Thanx 4 That , but can u tell me hw can i do this .
|
|
|
|
|
In which event, you are trying to find the control??
Regards,
Vengat P
|
|
|
|
|
select grid control go to property page and in that event list
will get rowdatabound event double click over there
in that eent you will get e.row type chek that type and then finde your control if row type is header
|
|
|
|
|
hy,
how can i call a web services page for an event on web page so that when ever an event is fired on web page(letz say update button),the processing(code for update) is done on web services page and then i get the result on the web page.The main motto is that the event should be fired on the web page, processing should be done in the web services page and result should be displayed again on web page.
regards
|
|
|
|
|
Unless I'm missing something thats pretty much a standard description for how a web service works. You need to write the code to send to/receive from the web service in your update button event and re-populate your page with the data received.
For further details search on CP for web services, there are loads of examples
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I have a site in which i have used i-frame
to open a site in which i have 2 I-frame
in those i-frames i am opening .aspx pages in which i have implemented Ajax and validations.
When i open this site with the help of browser then all Ajax control validators work fine but when i open this site in another site using iframe then it shows JavaScript error "Access Denied"
Site(A) .aspx Page
Iframe(place where I open site (B)
Site(B).aspx used two iframe
iframe 1
Iframe 2(open published .aspx pages)In this I have used Validaters
|
|
|
|
|
|
in my web site i want to proivde search facility to user
i have one folder which cintains some xls pdf and doc file
when user enter any key word i want to search in to all files under that folder i have used indexing service but not working poperly for xls file
plz help
|
|
|
|
|
Check this document out.
Make sure that you have don everything it says and if you still have a problem post back.
Indexing Service
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
yes i have done all the stuf working fine with doc and pdf file having problem with xls
|
|
|
|