|
Server.MapPath(Request.ApplicationPath)
FileUpload.PostedFile.FileName
using above two lines code you will get the image Path
|
|
|
|
|
Hi,
I am able to run an application from my local system. But when i keep the same application in the server, i am getting runtime error. Please help me.
Thank u
|
|
|
|
|
If you're moving the app to another system, it's obviously not an ASP.NET app. When yuo ask this in the right forum, try providing some more details. Is .NET installed on this machine ? What sort of error do you get ? Does the app run at all ( that is, do you see the UI ) ? etc.
Christian Graus - Microsoft MVP - C++
"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 am sorry for not being clear.
I placed my project in the server and now i am trying to run one of the asp.net page from some other system. Then i got runtime error. But when i do the same thing from my local system in which i developed the application, it worked fine.
And for ur information, .net is installed in the server also.
And the page which i am trying to open consist of datagrid and some coding to send mail.
Thank u
|
|
|
|
|
It is probably the version of .NET the web server is using.
In the IIS configuration, the ASP.NET tab, change the .NET version to 2.0.
NOTE: This may break older web pages on the server that need 1.1.
You will need to get into application pools in that case.
Edit: (Assuming of course you already have the site set up for ASP.NET.)
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
i m sending a link:
www.raisarplazaithub.com, this site is under construction.
ok first login with userid=abc,password=abc and then click on classified link and then place ur ad n thrn place ad after this a widow will open n now fill all entries, u will see at the mean time session will time out and page directecto home page.
plz follow these step ,
after this if u find the problem then plz n plz reply me.
this is web config file:
<configuration>
<appsettings>
<trace enabled="false" requestlimit="10" pageoutput="false" tracemode="SortByTime" localonly="true"> <sessionstate mode="InProc" stateconnectionstring="tcpip=72.36.151.90:42424"
sqlconnectionstring="data source=server;UID=uid;PWD=pwd"
cookieless="false" timeout="20">
<httpruntime executiontimeout="10000" maxrequestlength="6096" usefullyqualifiedredirecturl="false"
minfreethreads="30" minlocalrequestfreethreads="4" apprequestqueuelimit="100" enableversionheader="true">
<globalization requestencoding="utf-8" responseencoding="utf-8">
<pages validaterequest="false" enableviewstatemac="true">
<machinekey validationkey="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902" decryptionkey="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902F8D923AC"
validation="SHA1">
thanks.
-- modified at 7:49 Thursday 4th October, 2007
|
|
|
|
|
Hi!
Have another problem: how can i make the webpage so that everything is filled. I have a main table on the page and other controls inside it, but when i render it, there is always some white space around the table. Can the table fill the whole area of the page? Thanks in advance!
|
|
|
|
|
Set your page margins to zero and your table width to 100%.
|
|
|
|
|
i have a page which has 3 textboxes with names txt1, txt2 txt3.
based on an event i want to loop thru the name soemthing like
textbox temptxt=new textbox();
for (i=0;i<3;i++)
{
temptxt.name="txt"+(i+1);
temptxt.readonly=true;
}
in the sense use some temp textbox variable and use single loop to change th readonly porperty of the textboxes with similar kind of names instead of 3 if's and else
|
|
|
|
|
You could do that with reflection, I guess, but a far better way is to write a recursive functon to work through the pages Controls collection finding textboxes and setting them accordingly. Or, just put them in an array you can go over.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi...
All I've database table named : tblCategory.
The Table's structure is like :
ChildID-------Category Name---------ParentID
1------------ Category 1 ---------- 0
2------------ Category 2 ---------- 1
3------------ Category 3 ---------- 1
4------------ Category 4 ---------- 2
5------------ Category 5 ---------- 3
6------------ Category 6 ---------- 4
Here, For Example :
'Category 4' is the Child Record of 'Category 2' because 'Category 4's ParentID is 2.
Now, I want to find the all child record from ParentID.
Like : If I entered simple ParentID 1, then I want the all nested child record of Parent 1.
So, If Possble, Please give me sql query of it or any relavant solotuion.
Thanks is advance.
Regards,
Abhi
|
|
|
|
|
Just fire a query on ur datatable saying:
DataRow[] foundParent ;
foundParent = dt.Select("ParentID = 1");
if (foundParent.GetUpperBound(0) > 0)
{
for (Int32 intRowCnt = 0; intRowCnt <= foundParent.GetUpperBound(0); intRowCnt++)
{
foundChild = dt.Select("ParentID=" + foundParent[intRowCnt]["ChildID"]);
if (foundChild.GetUpperBound(0) > 0)
{
//Do something
}
for (intColCnt = 0; intColCnt <= dt.Columns.Count - 1; intColCnt++)
{
//Do something
}
}
and write this in for loop.
|
|
|
|
|
ASP.NET 2.0 wrote: and write this in for loop.
Means, I have to write this whole code in for loop of each and every row of DataTable or this is enough ??
Thanks for your posting. Please, Reply of this my confusion.
Thanks in advance.
Regards,
Abhi
|
|
|
|
|
This is the code:
DataRow[] foundParent ;
foundParent = dt.Select("ParentID = 1");
if (foundParent.GetUpperBound(0) > 0)
{
for (Int32 intRowCnt = 0; intRowCnt <= foundParent.GetUpperBound(0); intRowCnt++)
{
foundChild = dt.Select("ParentID=" + foundParent[intRowCnt]["ChildID"]);
if (foundChild.GetUpperBound(0) > 0)
{
//Do something
}
for (intColCnt = 0; intColCnt <= dt.Columns.Count - 1; intColCnt++)
{
//Do something
}
}
|
|
|
|
|
As Per Ur Requirement the query below is
select p.parentid,p.childname,p.childid from tblCategory , tblCategory p
where c.childid=p.parentid
1 Category 2 2
1 Category 3 3
2 Category 4 4
3 Category 5 5
4 Category 6 6
and also if u want to execute the query with where clause then
select p.parentid,p.childname,p.childid from #temp c , #temp p
where c.childid=p.parentid
and p.parentid=1
Hope It help u ....
Regards
Tarini Singh
Sr. Software Engineer. (IT)
tksingh@zenta.com
|
|
|
|
|
i have used code:
---------------
imgbtnSub.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');");
it works fine,but as i have given this under imgsub_click()
it pop-up message only during second click
i even tried giving onload, not working,
hw to pop-up during first time itself
Thanks in advance,
Priya.
|
|
|
|
|
Hi priya,
Does u give this code
"imgbtnSub.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');");" line in page load. if not than do the same.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Priya Cool wrote: it works fine,but as i have given this under imgsub_click()
it pop-up message only during second click
Can you put your code snippet here?
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
There are many ways to do the alert, but while asking about any thing from members in this forum u should equally need to give reply for the questions asked about your query.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
if (!IsPostBack)
{
if (CheckBox1.Checked == false)
{
Button1.Attributes.Add("onclick", " window.alert('Agree Terms & Conditions to proceed');");
}
}
i tried like tis, every time it pop-ups the message
even after checking the checkbox
Thanks in advance,
Priya.
|
|
|
|
|
Write a javascript function and u check there whether the checkbox is checked or not and then show the alert msg and add this
Button1.Attributes.Add("onclick", "Myfun();");
Hope this helps u??
|
|
|
|
|
Hi
try to put your Add attribute code to put under page load as given below and i am sure your prob got solved.and remove code from imgsub_click().
if (!IsPostBack)
{
ImageButton1.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');");
}
thanks
bhavesh
|
|
|
|
|
Hello
I am storing images in SQL 2005 using the Varbinary(Max) type, however I am looking for a way to display the images on an Image within a template for a datalist.
So far the only suggestions I have found is to save the image then use the fiels URL to set the Image's ImageURL location but this defeates the point from my perspective of saving the Images in the DB.
If somebody could point me in the direction of the best way to do this I would be grateful.
|
|
|
|
|
There's really no other way. Your best bet is to store the images locally and store the paths in your database. You can do a BinaryWrite to pass a byte array that represents a single image back, if that's all you intend to display, but you can't do that for images in the middle of a page.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi All,
I am build a treegrid using Javascript and whenever I refresh the page or running it for the first time I get the error saying:
"A script on this page is causing Internet Explorer to run slowly, If it continues to run, your computer may become unresponsive.
Do you want to abort the script?"
and Yes No Buttons
Can anyone tell me what might be the problem??
Thanks in advance....
|
|
|
|