|
ak_1989 wrote: If possible also send me the code for it.
There is no standard script to configure the SMTP Server and infact it is rather easy to configure it manually.
Did you try any of the links [^]from here.
Btw, at what point you are having problem?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi All,
I have an application in asp.net(C#), I've place back button on my web page.
On back button i have some sever side code.Problem is, when someone click on browser default back button, I am unable to execute my server side code on browser back button...
Please help me on this....
Thanks in advance
Yrishi
|
|
|
|
|
This Happens normally when You click the button more number of times for writing code.
Try Like This..!
1)Copy the Code from browser back button
2)go to source view delete the onclick="Button1_Click" html and delete the code of .cs file i.e. browser back button event completely with event.
protected void Button1_Click(object sender, EventArgs e)
{
}
3)Now go to button double click on the back button and paste the code..!
Hope it may help..!
|
|
|
|
|
Thanks for you reply,
sorry but my problem is, browser back button event is client side and i want to execute my server side code on that...
|
|
|
|
|
There are quite a few options:
1.) Use the web service.
2.) There is something called PageMethods [^]which you can make use of.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks for your reply...ok. I'll check it.
|
|
|
|
|
hello every one,i saw only fue controls in ajax tool kit,how can i get all the the control and use them.
|
|
|
|
|
The toolbox is useless, because the designer is useless. You should type your own markup, and as you do, you'll find you can select all the available controls. You can also control what's in the toolbox, but I never bother. Web developers should write their own code, b/c the generated stuff is always awful.
Unless you're working for an outsourcing company in India, then odds are that all your code is crap, you may as well use the designer to keep churning that stuff out.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
try this link download dll and add it in Your toolbox
[^]
|
|
|
|
|
Hello All,
I have a Gridview control that is working on my development machine, but in Production (Win 2003 Server) the Updating Event is not firing after the Edited Values have been changed and the user clicks on the "Update" link (Auto Generated). Does anyone see anything that may be preventing the "_Updating" event from firing?
<code><asp:GridView ID="gvRate" runat="server" AllowPaging="true" AutoGenerateColumns="false"
AllowSorting="true" OnPageIndexChanging="gvRate_PageIndexChanging" OnSorting="gvRate_Sorting"
EmptyDataText="No Data Found" CssClass="StyleSheet.css" PageSize="50" OnSelectedIndexChanged="gvRate_SelectedIndexChanged"
DataKeyNames="RateMasterId" ShowFooter="true" OnRowCommand="gvRate_RowCommand"
Width="100%" CellPadding="2" HeaderStyle-Font-Bold="true"
OnRowEditing="gvRate_RowEditing"
OnRowCancelingEdit="gvRate_RowCancelingEdit"
OnRowUpdating="gvRate_RowUpdating"
OnRowDataBound="gvRate_RowDataBound"
OnRowDeleting="gvRate_RowDeleting"
<!-- Rest of the Templates -->
</asp:GridView></code>
Here is what the code behind looks like:
<code>protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
GridDataBind();
}
}
public void GridDataBind()
{
ObjectManager loObjectManager = new ObjectManager();
DataTable dt = loObjectManager.GetObject().Tables[0];
gvRate.DataSource = dt;
gvRate.DataBind();
}
protected void gvRate_RowEditing(object sender, GridViewEditEventArgs e)
{
gvRate.EditIndex = e.NewEditIndex;
GridDataBind();
}
protected void gvRate_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
gvRate.EditIndex = -1;
GridDataBind();
}
protected void gvRate_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int liIndex = e.RowIndex;
Label lblMasterRateId = (Label)gvRate.Rows[liIndex].FindControl("lblRateMasterId");
// Delete the record
ObjectManager loObjectManager = new ObjectManager();
loObjectManager.DeleteRate(Convert.ToInt32(lblMasterRateId.Text));
Response.Redirect(BuildURLParameters());
}
protected void gvRate_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// Update Logic Here
}
protected void gvRate_RowDataBound(object sender, GridViewRowEventArgs e)
{
// Populates a Combo Box Items
}
protected void gvRate_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
DataTable dataTable = gvRate.DataSource as DataTable;
gvRate.DataSource = SortDataTable(dataTable, true);
gvRate.PageIndex = e.NewPageIndex;
gvRate.DataBind();
}
protected void gvRate_Sorting(object sender, GridViewSortEventArgs e)
{
GridViewSortExpression = e.SortExpression;
int pageIndex = gvRate.PageIndex;
DataTable dataTable = gvRate.DataSource as DataTable;
gvRate.DataSource = SortDataTable(dataTable, false);
gvRate.DataBind();
gvRate.PageIndex = pageIndex;
}
protected void gvRate_SelectedIndexChanged(object sender, EventArgs e)
{
}</code>
Thanks,
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
If it works locally, then surely it's some sort of deployment issue. Are you sure it's not firing ? How can you tell, you didn't post the code, could it be that it fired but the code does nothing for some reason ( like an if block at the top of it ) ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello Chris,
The code is deployed into production correctly. I did a remote debugging of the code on the server and stepped through the code. It does not even hit the "Updating" routine. The only routine that does fire after the user clicks on "Update" link is the "Page_Load" event.
Thanks,
Pete
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Is it running the right version of .NET ? What could be different between the server and your dev machine ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yep, its running the same version of .NET as my Dev Machine. I am just as confused as you as to why it would be executing differently on the server.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi,
1. Please check that you have uploaded .aspx file properly.
Kiran Banker
|
|
|
|
|
I think my subject is clear.
I need the username of the client pc. I do this in C# and I don't want to use ActiveX.
Can someone help me?
Madmatt.
|
|
|
|
|
_Madmatt wrote: I need the username of the client pc. I do this in C# and I don't want to use ActiveX.
You need to elobrate it more.
What is your target audience?
Are you using you application with in your company and using Integrated or Windows Authentication?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I have Windows Authentication activated and anoynimous acces is turned off. I want to read the client user out of the Active Directory, so I need the username to search for. Sorry for my English... Hope you understand me?
|
|
|
|
|
Have a look at this [^]article in MSDN, this will give good insight about Windows Authentication in ASP.Net.
You can get the user name like this:
string LstrUserName = HttpContext.Current.User;
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks for helping! But this seems to work too:
this.User.Identity.Name;
|
|
|
|
|
YEs, there are multiple ways to do this.
By the way, another way is using WindowsIndentity[^]:
WindowsIdentity.GetCurrent();
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Is WindowsIdentity not serverside? I think it is. Isn't it?
|
|
|
|
|
_Madmatt wrote: I think it is. Isn't it?
Obviously it is. And the GetCurrent returns the WindowsIdentity object that represents the current Windows user.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Manas Bhardwaj wrote: the current Windows user.
The current logged on user on the server or client side?
|
|
|
|
|
_Madmatt wrote: The current logged on user on the server or client side?
Why dont you give it a try ?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|