Can Count On Ctl00_PagePlaceHolder_myId Staying The Same
Jan 16, 2010
I need to push something into my ASP.NET web form page from a Silverlight control.
I set the ID of my text box and, as is it's want, ASP.NET "helpfully" adds on the ctl. Can I assume this will always be the same gumpf it puts on the beginning of my id?
I'm using the Windows Identity Foundation (WIF) Security Token Service (STS) to handle authentication for my application which is working all well and good. However I can't seem to get any long running login with the STS. From my understanding I shouldn't care about the client tokens at the application level since they can expire all they want to and it should redirect me to the STS and as long as they're still logged in on the STS it should refresh their application token. Yet it doesn't seem to want to keep them signed in.
Here's what occurs in my login.aspx on the STS var cookie = FormsAuthentication.GetAuthCookie(userName, persistTicket); if (persistTicket) cookie.Expires = DateTime.Now.AddDays(14); Response.Cookies.Add(cookie); var returnUrl = Request.QueryString["ReturnUrl"]; Response.Redirect(returnUrl ?? "default.aspx");
Which was taken almost directly from existing application using normal Forms Auth. From my web.config <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="2880" name=".STS" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" /> </authentication>
Looking at the cookie after I sign in I can see the expires time on the cookie is set for 14 days in the future and that the cookie is NOT a session cookie. When I'm required to log back into the STS I can see that my original cookie is still there. Is there some kind of time stamp functionality that the STS embeds into the cookie that is invalidating my cookie even though as far as I know it should still be valid?
It pulls through the Username correctly from the cookie, however the CheckBox for Remember Me does not become checked when I view the page, even though the code for setting it on the Page_Load is being executed.
LoggedIn event for setting the cookies protected void lLogin_LoggedIn(object sender, EventArgs e) { // If Remember me then set an appropriate cookie if (lLogin.RememberMeSet) [code]...
I am using jQuery tabs and an ASP.NET listview to display and edit some information. My problem is that when a user inserts a new record in one of the listview items my jQuery tabs go back to the first tab. Is there a way to keep track of which tab I am on or keep it from resting on post back?
My web application uses forms authentication. One of my users who uses IE8 says that she always stays logged into the website on her computer. This is even after she closes the browser window and restarts the computer. This only happens on her computer, if she switches computers the same thing won't happen.
I'm baffled by this. Is there a setting in IE that could save her login information and automatically sign her in every time she accesses the website? Is there anything else to look into?
When a user submits the query to SQL when clicking a button I need to get a count of the number of rows that are returned. Which event does the gridview.count code need to be place in?
Right now I have it in the btn_click event, but in order to get it to count the rows you have to hit the button twice since the query is not returned yet. Here is my code.
I HAVE A GRID VIEW IN asp.net + VB Code. There is a drop down list and the selected data is displayed in web page. I placed a label in web page and code behind i used following code.
Protected Sub GridView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.DataBound Label1.Text = GridView1.Rows.Count.ToString() Dim ONYO As Integer = 0 Dim DONE As Integer = 0 For i As Integer = 0 To GridView1.Rows.Count - 1 If GridView1.Rows(i).Cells(0).Text = "ON YO" Then
We're getting a server error saying "Parameter count does not match Parameter Value count." Anyone have any idea what this could mean?
[URL]
Our site's on ASP.NET Webforms running DotNetNuke as a CMS.
I've tried uploading an older version of the web.config file but it doesn't seem to have changed since the error came up. It wasn't in any of our recent module file uploads because I reuploaded the old files from this morning that we changed.
Could any changes in the database cause this or would it have to originate from an error in the code?
I am implementing paging in my GridView. From this article, I need two methods:
public IQueryable BindEmployees(int startRowIndex, int maximumRows) { EmployeeInfoDataContext dbEmp = new EmployeeInfoDataContext(); var query = from emp in dbEmp.Employees join dept in dbEmp.Departments on emp.DeptID equals dept.DeptID select new { EmpID = emp.EmpID, EmpName = emp.EmpName, Age = emp.Age, Address = emp.Address, DeptName = dept.DepartmentName }; return query.Skip(startRowIndex).Take(maximumRows); }
And
public int GetEmployeeCount() { // How can I not repeat the logic above to get the count? }
How can I get the value of the second method GetEmployeeCount from the first method BindEmployees ? I mean without repeating the logic (the query)?
I have a bit of xml file named Sample.xml which is shown below
[Code]....
i have button named submit(button1).If i click that button i need to display the count in a text box named textBox1, means How many PartitionName="AIX" is belonging to Type="NIC"
This is something I can easily do in SQL, but I'm pretty new to LINQ and haven't been able to find an answer online.
I need a LINQ query that returns two values; the first a distinct value and the second the count of the first value. This is filtered by a parameter. Here is my table:
I need to find the count of records between the first and last day of the current month.I am very new to linq and having doubts in getting the count, below is the code i have written.
I have a foreach loop that displays survey testimonials. The user is allowed to pick only 5 testimonials. Is there an easy way to disable the rest of the checkboxes once the selected item is 5? I was trying this in jquery but this is not doing anything.
I have stored resumes in my database and i have retrive it from asp.net web page by creating linkbutton...i can view ,download the resumes which i stored in my database.My issuse is when i view one resume example (domnic resume)then no of visitor for domnic resume should be count .if again i view that resume no of visitor should be 2...how can i do that in asp.net?