|
thnks for the help ....
enjoy..
|
|
|
|
|
Dear all,
I am developing web application using asp.net C#(Visual Studio 2005)
I want to know Is it possible to check whether given file name is physically present on the specified location.
Thanks
regards
imran khan
|
|
|
|
|
If you are asking on Client-Side, use the built in control for file uploading ( i forgot the name).
On Server side, ofcourse you can check whether a file exists using all available I/O classes.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Try to use "System.IO.File.Exists("path")". path is the physical file path and it will return you a boolean value.
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
hi all
I am developing a application on Asp.net (2.0) and Flash
When i get a Image on Database after that i want give it to Flash (so dont save this image on Server Machine)
How will i do that ??
|
|
|
|
|
this is very tricky one. i think...
if u simply response out our image to client, then u will not be able it save it on client side by right clicking.. it.. i dont know the exact ans.. but in flash u always put request to server and for data and server returns in form of its response.. if find a way when u an read binary format then it will e easy to get data image data from database/....
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
|
|
|
|
|
Hi!
In my application, there is three databases. one is in oracle ,second is in SQL Server & third is in MySQL. now i want to wirte a class for this. i have heard from my friend that there is an article on codeproject.com .can any give me link of that article?????
Thanks & Regards,
SAMir Nigam,
Software Developer,
STPL, Lucknow, India.
|
|
|
|
|
|
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
|
|
|
|