|
Do you have SMTP server running on "localhost" ?
|
|
|
|
|
Hi,
An SMTP server is a computer that receives outgoing mail messages from users and routes them to their intended recipients. So I would like to know whether the mechine that you are working now, does it fall to this category? If not find out the mail server IP Address/Name and use it instead.
Thx,
Gayani
|
|
|
|
|
Don`t worry... Its ust a security constraint.You mail won`t be sent,but stored in the "C:\Inetpub\mailroot\Queue" folder. Once you deploy ur application on production server, just change the settings from localhost to your smtp server.
|
|
|
|
|
when i place a calendarPopup control into updatepanel it doesn't work
|
|
|
|
|
legend_of_zanado wrote: when i place a calendarPopup control into updatepanel it doesn't work
CalendarPopup? What type of control it is?
|
|
|
|
|
Are you using any third party control or you are using Calendar control in a popup window?
cheers,
Abhijit
|
|
|
|
|
Hi,
Yes..its possible that CalendarPopup Control would not work with ScriptManagers and UpdatePanel.
Beause it collide with the JavaScripts used in ScriptManager.
Thx,
Gayani.
|
|
|
|
|
In an ASP.NET web site, I am getting compiler errors on 12 out of about 70 pages, complaining about another partial declaration of the code behind class existing, yet only one declaration of the class exists in the entire solution. I suspect that something somewhere still has a 'declaration' for these classes in a binary, but I don't know where to start looking.
|
|
|
|
|
I discovered that the 'phantom' class is always generated as a partial class for the 'designer' code.
|
|
|
|
|
I have a webservice test.asmx which is located in test folder and has GetContents webmethod and . Inside
this directory i have one more directory test2 which has webservice test.asmx which has same webmethod GetContents().
whenever a webrequest GetContents() is made I have a httpmodule which is used for redirecting from test\test.asmx webservice to the
to the webservice test\test2\test.asmx based on a particular version.
But Server.Transfer("test2\test.asmx") is throwing the exception
"Error executing child request for test2\test.asmx."
or there is any approach through which i can redirect.
Iam using dot net framework 2.0.
Any help is appreciated.
|
|
|
|
|
does the Exception come with more information? Something like an InnerException?
Maybe Server.Transfer("~/test2/test.asmx") will work.
Good Luck
|
|
|
|
|
I write this code for editing datalist.there is an upload and two textbox in EditItemtemplate .but when I go to edit mode ,sometimes I want to edit only ,for example name in one textbox and I don't want to change or upload a picture for it.at this time this code has error because the upload control is empty. what should I do?
protected void datalist_editcommand(object source, DataListCommandEventArgs e)
{
DataList1.EditItemIndex = e.Item.ItemIndex;
DataList1.DataBind();
}
protected void datalist_cancelcommand(object source, DataListCommandEventArgs e)
{
DataList1.EditItemIndex = -1;
DataList1.DataBind();
}
protected void datalist_updatecommand(object source, DataListCommandEventArgs e)
{
int stid = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex]);
TextBox firstname = (TextBox)e.Item.FindControl("txtfirst");
TextBox lastname = (TextBox)e.Item.FindControl("txtlast");
FileUpload picupload = (FileUpload)e.Item.FindControl("FileUpload1");
string filename=Path.GetFileName(picupload.FileName);
picupload.SaveAs(Server.MapPath("~/pic/")+filename);
SqlConnection con=new SqlConnection(connectionstring);
string sqlup = "update stt set stname=@stname,stlastname=@stlastname,picture=@picture where stid=@stid";
SqlCommand com = new SqlCommand(sqlup, con);
com.Parameters.AddWithValue("@stid", stid);
com.Parameters.AddWithValue("@stname", firstname.Text);
com.Parameters.AddWithValue("@stlastname", lastname.Text);
com.Parameters.AddWithValue("@picture","~/pic/"+filename);
con.Open();
com.ExecuteNonQuery();
con.Close();
DataList1.EditItemIndex = -1;
DataList1.DataBind();
}
protected void datalist_deletecommand(object source, DataListCommandEventArgs e)
{
int stid = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex]);
SqlConnection con=new SqlConnection(connectionstring);
string sqldel = "delete from stt where stid=@stid";
SqlCommand com = new SqlCommand(sqldel, con);
com.Parameters.AddWithValue("@stid", stid);
con.Open();
com.ExecuteNonQuery();
con.Close();
DataList1.DataBind();
}
|
|
|
|
|
bbc_sh wrote: for example name in one textbox and I don't want to change or upload a picture for it.
First check if FileUpload control has file then save it
FileUpload picupload = (FileUpload)e.Item.FindControl("FileUpload1");
string filename="";
if(picupload.HasFile)
{
filename=Path.GetFileName(picupload.FileName);
<small>this code gave you an error because how did you get filename if fileupload control did not have any file</small>
picupload.SaveAs(Server.MapPath("~/pic/")+filename);
}
your sql query string also will be changed like this
if you do not want to change the picture then you need not to pass picture parameter to the sql query string
string sqlup = "update stt set stname=@stname,stlastname=@stlastname ";
if(filename!="")
{
sqlup +=" ,picture=@picture ";
}
sqlup +=" where stid=@stid";
your parameter also changed
Also you need not to add parameter of picture file
if(filename!="")
{
com.Parameters.AddWithValue("@picture","~/pic/"+filename);
}
regards
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi,
how can i update opener parent if opener is closed ?
This are the scenario
1. MyPage - > MySecondPage
in This case, i am able to refresh Mypage using ProgressWindow
2. MyPage -> MiddlePage -> MyScondPage
in this case i have to update MyPage , but problem is , when MySecondPage opening , its close MiddlePage [ This is Requirment ]. Now i am unable track the parent . Please Help
Check out the close
function CloseNupdateWindow()
{
if ( window.opener && window.opener.closed )
{
}
else
{
window.opener.location.href = window.opener.location.href;
if (window.opener.progressWindow)
{
window.opener.progressWindow.close()
}
window.close();
}
}
cheers,
Abhijit
|
|
|
|
|
Do you need to open a new window for the second page? Can't you open it in the same window?
Otherwise, close the window for the middle page from the second page, so that you can pick up it's parent before you close it.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: Do you need to open a new window for the second page? Can't you open it in the same window?
No, i have to open it on "Second Page". This is Requirment.
Guffa wrote: close the window for the middle page from the second page, so that you can pick up it's parent before you close it.
you want to mean, i just close middle page from Second page ? but after that will i able to get the orginal parent id ?
Thanks for response !!!
cheers,
Abhijit
|
|
|
|
|
Abhijit Jana wrote: you want to mean, i just close middle page from Second page ? but after that will i able to get the orginal parent id ?
No, before that you are able to get the parent of the middle page window. Put the reference to the parent window in a variable, so that you can still get to the parent window when you have closed the middle page window.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have a request to add features to a precompiled web site. I understand this to not be possible under normal circumstances, but is there any way to do this via underhanded techniques, such as intercepting requests etc?
|
|
|
|
|
Hello Help Desks,
I am searching a solution for printing a ASP.NET 2.0 Web Page Which contiain GridView.
Description : Gridview is created by adding Rows and Columns dynamically.
I am creating a Cross Tab report here, so the no. of columns are in dynamic.
I need to print this gridview on A4 Size paper which is always more than 20 columns. But While taking the print out it shows me only the first few columns which fit in A4 [here Last column may lost its data if its width is larger than A4]. And main problem is it never carry/wrap the printing to next page if then number of columns are larger than page size.
It takes only one page printout.
I am also facing a Font problem here. I have set the Font size to 13 usiing CSS to grid, but it shows font in very small size.
I have tried using
w
Window.print(); on client side, System.Drawing.Printing on server side but not working any thing..
PLZ PLZ. Help me out ...
Regards
|
|
|
|
|
Intellect wrote: Hello Help Desks
These forums are not help desks. People are free to help if they want.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
SqlDataSource1.SelectCommand = "Select columns from TableName";<br />
GridView1.DataSourceID = SqlDataSource1.ID;<br />
GridView1.DataBind();
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
|
No problem.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Why you delete the Message ?
cheers,
Abhijit
|
|
|
|