|
I dont know about any article about this... but i think i it is simple to do...
all u have to know that whick kind of data base u want to access..
if sqlserver.. then call provider sqlclient
if not then use odbc thic can connect almost every data base..
it will took little time but it will be good for learning then u an put that article on the web for others
cheers
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
|
|
|
|
|
Hi
i have used forms authentication for securing some of the web pages of my site.i want to grant admin previledge to one of the user so that he will be only having access to admin.aspx...for that i have modified my web.config as follows:
..location path="admin.aspx"..
..system.web..
..authorization..
..allow users="admin"..
..deny users="*"..
...authorization..
..systeb.web..
can anybody help me how can i configure only one user to have access to admin.aspx...since my site is forms authenticated..now any user can access to admin.aspx...so how can i configure admin status for a particular user..
its urgent..
thanks in advance..
Pradip Kishore
|
|
|
|
|
hi
..allow users="xyz"..
add the above line below the line
..allow users="admin".. and see whether it works.
|
|
|
|
|
hi all
i want to know how to create dynamic links/urls like..
http://www.abc.com/demo/server01/Tab.asp?Tab=2&PROJECT_ID=75"
i want to know how to create the urls from.. "tab.asp?tab=2&project_id=75 "
how to create these id values automatically and how to access them when i want to hyperlink them to another page...
for ex: i have table like:
name profession skills
--------------------------------------
pradip software .net
john telecom cdma
... .... .....
i want to make my each entry of name,profession,skills to be hyperlinked so that when ever i will click on any item...it will generate a link like the above mentioned and accordingly navigate to the detailed page...
its urgent..please help me..
thanks in advance..
pradip kishore
|
|
|
|
|
Follow following steps.
1-Create a Datagrid and place a template column where you want to palce the hyperlink to appear.
Eg:
<asp:TemplateColumn HeaderText="Details">
<ItemTemplate>
<a href=http:
%>'>Details</a>
</ItemTemplate>
</asp:TemplateColumn>
2: Load the values from database to a data table of data reader and bind it to Datagrid.
3: In the recieving page get the id from query string and fetch details from the database on basis of that id.
Note: you need to create the correct hyperlink in the ItemTemplate column, here i have created just a dummy link.
Regards
Prakash
|
|
|
|
|
when you are providing the target url for the names generate the dynamic url.
lets say you got all the data frm db and have it in a dataset.
then it wouldbe targeturl=www.abc.com/....?name"+ds.tables[0]["columnname"]......
Gautham
|
|
|
|
|
What would happen if some special characters are stored in the database ? ( for example "&" which is used in query strings )
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Good question, never came across that!
Make sure that your database doesnt have any specila characters, kidding!
May be we have o filter the value again at the front end???
You know the answer?
Gautham
|
|
|
|
|
when inserting data into database always HtmlEncode it first. When displaying the data on forms HtmlDecode it.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hi All,
I need to send some values from PageA.aspx to PageB.aspx and the options would be sessions or QueryString!!!
Dont want to use sessions since the application has too many sessions as of now!!!
QueryString?? the information passed would be customer's information so not secure and at the same time i would need to pass like 20 values, so hould i include all these values in the querystring??
Any other suggestions??? Kindly suggest!
Gautham
|
|
|
|
|
You can user Server.Transfer("page.aspx") method to pass values from one page to other page.
Create a collection property in PageA which contains all the values you want to pass, and access the property in the PageB.aspx, but remember that use Server.Transfer insted of Response.Redirect method and EnableViewStateMac page directive value should be false, other wise you'll get error.
Regards
Prakash
|
|
|
|
|
HI
Instead of creating in the page you can have seperate class called DataCintainer class which will have all Private varuables and public properties containing your data so that you can access from Anywhere Only you need to assign values before going to second page
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Thanks Sandeep,
can you provide me sort of example??
Gautham
|
|
|
|
|
private string _CategoryId = "";
public string CategoryId
{
get { return this._CategoryId; }
set { this._CategoryId = value; }
}
private string _CategoryName = "No Group";
public string CategoryName
{
get { return this._CategoryName; }
set { this._CategoryName = value; }
}
private int _CategoryState = 0;
public int CategoryState
{
get { return this._CategoryState; }
set { this._CategoryState = value; }
}
private string _AccountNumber = "";
public string AccountNumber
{
get { return this._AccountNumber; }
set { this._AccountNumber = value; }
}
private string _AccountType = "";
public string AccountType
{
get{ return this._AccountType;}
set{ this._AccountType = value;}
}
private string _RoutingNumber = "";
public string RoutingNumber
{
get{ return this._RoutingNumber;}
set{ this._RoutingNumber = value;}
}
private System.DateTime _LastCollectionDate;
public System.DateTime LastCollectionDate
{
get { return this._LastCollectionDate; }
set { this._LastCollectionDate = value; }
}
private bool _HasPendingCollections;
public bool HasPendingCollections
{
get{ return this._HasPendingCollections;}
set{ this._HasPendingCollections = value;}
}
private bool _ShowActionLinks = false;
public bool ShowActionLinks
{
get{return _ShowActionLinks;}
set{_ShowActionLinks = value;}
}
private string _BankName = "";
public string BankName
{
get { return this._BankName; }
set { this._BankName = value; }
}
this is container class with public properties and private varaibles
create a object of this class and pass this object to the page where you want to show/use tha data
example from page 1 to page 2
InSubmitstep of page1
this.PropertyOfPage2.pupulateData(this.DataContainerObject);
i think it is effective if you have large data and pages ?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Hi Sandeep, to store object of DataCintainer class which you have specified we need to do some state management which he don't want to use. I hope you agree with me on this point.
Regards
Prakash
|
|
|
|
|
Ya state manegement is required for that concept OK Boss
you have given right solution then
<l>Thanks and Regards
Sandeep
|
|
|
|
|
hi can you help me with this?..
i have
in my class table--
classcode nvarchar,
teacher nvarchar,
room nvarchar,
TimeStart dateTime,
TimeEnd dateTime,
in my input for example--
class1 teacher1 room1 Feb-02-2007 8:00:00 AM Feb-02-2007 18:00:00 PM
If another class will be inserted it should not be in between the timestart and the timeEnd or else shows some error.The teacher should have training after the timeEnd and the room should be occupied after the training.
this input shoud not be accepted---
class2 teacher2 room1 Feb-02-2007 9:00:00 AM Feb-02-2007 18:00:00 PM
thank you very much....
Bernie
|
|
|
|
|
HI
Are you doing the console application ?
Are you passing all your data to database i.e What are you using for storing perpose ? and i am confused about your requirement What you want actually?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
i am using asp.net web express, i want in my program to CHECK constraints,
For example..
The teacher has training from JAN-02-2007 8:00:00 AM - JAN-02-2007 18:00:00 PM,
The teacher must not have training between the time given. He can have traning if the EndTime was finish..
Can you show me sample CONSTRAINTS CHECK?
Bernie
|
|
|
|
|
You can use query string to send multiple values and these values may be encrypted from the source page. These will be decrypted on the target page. This, i think, would be a simple solution.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hey Cool
Suppose i have many pages and have to flows between those then i need to make encryption and vice versa every time ? is it right
<l>Thanks and Regards
Sandeep
|
|
|
|
|
You can put the encryption and decryption logic in a class and use those static methods from anywhere in your site. Not a great deal, i guess.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
example code or reference site??
Gautham
|
|
|
|
|
|
No clue whatsoever you are talking about???
Gautham
|
|
|
|