|
hi friends,
i am getting trouble to access more then two class files with the concept of inheritence(drived class)......means.... i having one base class... i have developed one more class want to include drive for the previous class......
and also... kindly give me idea to include..values objects... to acces the diffent page controls...
bye,
forever friend,
sarala.s
|
|
|
|
|
are both classes in the same namespace?
You can group classes into namespaces and include in other classes.
|
|
|
|
|
yes.. exactly i tried as u said...but getting probs....
can u suggest to include .. namespace and include the class??
or any gud website to refer???
|
|
|
|
|
I'm not sure whether you are looking for this, but i'm giving you an example
first.cs
--------
using System;
using System.Data;
using System.Configuration;
using System.Linq;
.
.
.
namespace Test
{
public class Images
{
public memberFunction();
{
//do something
}
}
}
----------
second.cs
---------
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using Test; // including the namespace
.
public class DB
{
private method1()
{
Images images=new Images();
images.memberFunction();
}
}
Does it make sense?
|
|
|
|
|
Are you trying to inherit one asp.net page class from another?
This isn't really a great way to go about this, if it is the case - pages should stand alone from each other.
|
|
|
|
|
hi,
I want to add ancre to url when the event onload page is done with javascript but without reloading the page.
how can i do it.
I also want to catch the onclick event on the back button of an explorer.
Thanks a lot for your answer!
|
|
|
|
|
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
|
|
|
|