|
yes .. i really appreciate this code project ... its amesome..
Some Thing need 2 do NEW
|
|
|
|
|
Hi,
Good Day!
In my ASP.NET MVC application, I have 2 dropdown lists.
First one with 2 items namely A.P. & U.P.
When I select an item in the dropdown list, second dropdown list should be populated with corresponding cities in that state. Cities names should be retrived from a table in SQL Server 2005 database.
Your help will be very much appreciated.
Thank you,
Raju
|
|
|
|
|
Enable postback to true of DropDownlist1 and on selectedindexchange event of first dropdownlist1 select data from table and populate second dropdownlist.
example:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
<br />
SqlDataSource1.SelectCommand="select * from cities where idcity="+dropdownlist1.SelectedValue;<br />
DropDownList2.DataSourceID = "SqlDataSource1";<br />
dropDownList2.DataValueField = "IDCity";<br />
dropDownList2.DataTextField = "CityName";<br />
dropDownList2.DataBind();<br />
}
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Thanks.
Your reply is correct in normal ASP.NET application.
But I want in MVC application.
|
|
|
|
|
i want to use ajax toolbars in my dotnet 2008.but when i chooseitem in toolbar and select ajaxtoolkit.dll for samplewebsite it show error " could not load file or assembly"systemweb.extension....."or one of it dependencies. there was an error loading types from assembly"
i download two copies 4om different websites but both show this error
|
|
|
|
|
I cant understand how you can get a dll in a toolbar. please give us more info.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
from toolbar right click and select option choose item...and then try to add ajax tool kit dll....ok
hope you get the solution
|
|
|
|
|
i have done the same thing which u have mention but it show that error
|
|
|
|
|
d
modified 18-Jan-13 8:48am.
|
|
|
|
|
|
If you are hosting it on IIS, Make sure, you have set ASP.net version 2.0.x.x in IIS virtual directory.
Let me know if you have issue.
|
|
|
|
|
What I am trying to do is to keep client on a webform where he/she stays for a while before redirecting him/her to another page. I put a sleep to a page load however page sleeps before displaying the information and redirects as soon as sleep process finishes. SO nothing can be seen?
How could I come over this problem.
|
|
|
|
|
You could use javascript. Set a timeout which calls a function to redirect the page. This will all happen client side and therefore you give the end user the page to view.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)
|
|
|
|
|
I am sending the page to be redirected as querystring.
how will I send this information to java script
|
|
|
|
|
You have to parse the href yourself to get the value. A quick google gave this.
http://www.netlobo.com/url_query_string_javascript.html[^]
I hope that helps.
You can then redirect based on the parameter returned.
window.location = url
where url is the reutrned query string.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)
|
|
|
|
|
|
Hi,
I cannot open the site in number of pages which is published in my local iis.
When i try to access the link above 10 or 12 pages it show page cannot found error. When refresh the already opened pages, same error.
Whant is the issue?
Thankyou
YPKI
|
|
|
|
|
yesu prakash wrote: When i try to access the link above 10 or 12 pages it show page cannot found error. When refresh the already opened pages, same error.
I didn't get you. Please explain in details.
Thanks
|
|
|
|
|
I published a site in my local IIS, when i access the site in more than 10 or 12 browsers at a time, it cannot acces it. It show page cannot find page. If i close 2 or 4 pages, then again i can open the site in 2 or 4 browsers.Upto 10 or 12 browsers it is ok.
After getting the error, when i refresh any already opened browser, it show page cannot find error
|
|
|
|
|
Unless you are running a Windows Server OS your concurrent connections are limited. There is a maximum number of concurrent requests that your workstation IIS will serve.
If you want more concurrent connections you may have to move your application to a server.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)
|
|
|
|
|
there some another sites are published in the same IIS, they all working fine
|
|
|
|
|
Using Forms Authentication and locking down the path so you need to be authenticated to access the pages / data.
I am trying to use the current authenticated user credentials in order to process a web request within the .aspx page that the user has navigated to. Code as below:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
req.Credentials = CredentialCache.DefaultCredentials;
WebResponse res = req.GetResponse();
NOTE: the uri is valid.
The response is a redirect to the login page (bad credentials redirect to login page) and not the requested data provided by the web request.
I am struggling to find what I need to do in order for this request to be processed as though it was the current authenticated user.
Any advice is most appreciated.
Thanks in advance.
Ant.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)
|
|
|
|
|
Forms Authentication works (by default) by storing an encrypted ticket as a cookie upon login, which the authentication module then reads and interprets to determine the currently logged in user.
For the situation you describe to work (if I am not misunderstanding you), the uri that forms your HttpWebRequest needs to either be in the same web application (which would be very unlikely) or it would be to a web application that is configured to use forms authentication with the same machineKey as the calling application. Configuring multiple applications with a common machineKey in web.config is one way to achieve single sign-on, allowing the user to have one login that passes through to other applications. You can read the following article, under "Web Farm Deployment Considerations" to see how:
http://msdn.microsoft.com/en-us/library/ms998288.aspx[^]
There is also a bunch of blog articles describing single signon you can find by googling "asp.net forms authentication single sign-on"
Then from the calling application it would be a matter of adding the forms authentication cookie that has already been created (again through the successful submission of a user login form) to the request object's CookieContainer[^] prior to making the call. If the target application is configured correctly, it will automatically interpret the cookie and the forms authentication credentials to determine the user.
|
|
|
|
|
Many thanks Mike, getting the cookie and adding it to the request CookieContainer is exactly what I wanted.
Just for others to reference I have included my code.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
HttpCookie cookie = HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
Cookie authenticationCookie = new Cookie(FormsAuthentication.FormsCookieName,
cookie.Value,
cookie.Path,
HttpContext.Current.Request.Url.Authority);
req.CookieContainer = new CookieContainer();
req.CookieContainer.Add(authenticationCookie);
WebResponse res = req.GetResponse();
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)
|
|
|
|
|
I'm glad, Ant. Nice code snippet too.
|
|
|
|