|
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.
|
|
|
|
|
'cause I'm logged on on the server and on my pc with the same account
But my code works so I'm happy
I'll give it a try, specially for you!
|
|
|
|
|
i need to play some videos in media player. While doing this, media player waits for taking whole the video to ram. this takes alot of time when size of video is about 200-300 mb. How can media player do this partly. my code is:
myObjectTag = myObjectTag + "<OBJECT id=playera classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 style=\"position: absolute;left: 0; top: 0; width: 100%; height: 100%;\" standby='Media is loding...>";
myObjectTag = myObjectTag + "<param name='url' value='" + sourceUrl + "' />";
myObjectTag = myObjectTag + "<param name='src' value='" + sourceUrl + "' />";
myObjectTag = myObjectTag + "<param name='AutoStart' value='true' />";
myObjectTag = myObjectTag + "<param name='Balance' value='0' />";
myObjectTag = myObjectTag + "<param name='CurrentPosition' value='0' />";
myObjectTag = myObjectTag + "<param name='showcontrols' value='true' />";
myObjectTag = myObjectTag + "<param name='enablecontextmenu' value='true' />";
myObjectTag = myObjectTag + "<param name='mute' value='false' />";
myObjectTag = myObjectTag + "<param name='PlayCount' value='1' />";
myObjectTag = myObjectTag + "<param name='rate' value='1.0' />"; //0.5=Slow, 1.0=Normal, 2.0=Fast
myObjectTag = myObjectTag + "<param name='uimode' value='full' />"; // full, mini, custom, none, invisible
myObjectTag = myObjectTag + "<param name='showdisplay' value='true' />";
myObjectTag = myObjectTag + "<param name='volume' value='50' />"; // 0=lowest, 100=highest
myObjectTag = myObjectTag + "</object>";
|
|
|
|
|
This is so FRUSTRATING...
I was losing session information when embedding an iFrame inside a PHP site, so decided to switch from InProc mode of sessions to StateServer. Made/added the following lines to my web.config:
<br />
<sessionState mode="StateServer" timeout="60" cookieless="AutoDetect" stateConnectionString="tcpip=localhost:42424" /><br />
<pages enableSessionState="true"> <br />
<httpModules><br />
<add name="Session" type="System.Web.SessionState.SessionStateModule" /><br />
and yet, the first time I touch a Session variable I get a:
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.
I am using Master and Pages and the Session is in the Master Page_Load code behind.
Any help is greatly appreciated.
|
|
|
|