|
Hi guys.
I've migrated an ASP.NET application from a Windows Server 2003 environment with IIS 6 to a Windows Server 2008 environment with IIS 7.
I'm still finding my way around the Windows 2008 environment. I've managed to add the application to IIS 7. There seems to be some compatibility issue I'm experiencing, and I don't know how to fix it.
IE: The DHTML menus don't function at all. Is there some Handler Mappings that I'm missing or is it something else entirely?
Mozilla: The DHTML menus are functioning, but not properly.
Any suggestions on how to solve this issue?
|
|
|
|
|
What version of IE and Mozilla did you try? Check if your existing deployment working as needed on the current browsers. It can very well be a browser issue rather than an IIS issue.
I'm yet to get my hands on a IIS7 deployment so no pointers there.
|
|
|
|
|
I've tested on IE 7 & 8 and Mozilla 3.5.5
|
|
|
|
|
Hi, I have a strange problem. I have implemented a modal popup which works fine when I click on the OK and Cancel buttons. The other buttons on the page also work fine and trigger the correct events.
However, if I click on the Cancel button on the modal popup, then click on another button on the page, it reverts to the behaviour of my target control ID button (OK button). This also happens to link buttons.
Does anybody know what might be causing it?
Thanks
|
|
|
|
|
The problem was caused by me setting the PostBackUrl of the button in the code behind. This has been taken out and I have added left the OnClick attribute to the button in the XSL file where the button is.
|
|
|
|
|
Hi,
How to get the character from the given index of a string.
eg:
string s = "Hello World"
index = 2
I need to return the char 'l'
Thankyou
|
|
|
|
|
string chars = s.Substring(index, 1);
where 1 is the length of string after index.
|
|
|
|
|
You can get the character directly like this:
string s = "Hello World";
char c = s[2];
|
|
|
|
|
Use ...
char ch = x.ToCharArray()[index];
It will return the character.
|
|
|
|
|
hello sir,
i am working on asp.net an problem is masterpage design in menu templete....
|
|
|
|
|
pooran singh niranjan wrote: i am working on asp.net an problem is masterpage design in menu templete....
I didnt get your point. What do you mean by that ? You want to use Menu control in master page ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
sir,
menu use in masterpage ...
example
1.home click->
persnal info.
other
2. contact->
|
|
|
|
|
You can have a look into this.
ASP.NET Menu Control[^]
It clearly says how you can use menu control in asp.net. Let me know if you have any further issue.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
modified on Monday, November 30, 2009 6:38 AM
|
|
|
|
|
Abhijit Jana wrote: You can have a look into this.
It seems that you forgot to place the link. If not, could you please make it clear.
|
|
|
|
|
Thanks Anurag. I have missed out that !!!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
You can use .Net Menu Control in master page same as any other page.
Could you please specify what problem you are facing in doing so?
|
|
|
|
|
|
|
I have function where I get name of the manufacturer in datatable.These manufacturer name comes as link in my usercontrol list.When I click it, it get passed in querystring for search result.
Example:
http://xyz.com/productlist.aspx?Section=Terminals&Manufacturer=Lenovo pc
but in list I have Lenovo pc & NetStation
My request is passes as
<% If Manufacturer = "" Then%>
<h2 class="subheading">
Manufacturers</h2>
<ul>
<% While Manufacturers.Read()
'Response.Write("<li><a href='/ProductList/" & Section & "/" & Manufacturers(0) & "/" & MinPrice & "/" & MaxPrice & "/" & Search & "'>" & Manufacturers(0) & "</a>(" & Manufacturers(1) & ")</li>")
Response.Write("<li><a href='/productlist.aspx?Section=" & Section & "&Manufacturer=" & Manufacturers(0) & "&MinPrice=" & MinPrice & "&MaxPrice=" & MaxPrice & "&Search=" & Search & "'>" & Manufacturers(0) & "</a>(" & Manufacturers(1) & ")</li>")
End While%>
</ul>
<% Else%>
<h2 class="subheading">
Manufacturers</h2>
<ul>
<%--<% Response.Write("<li><a href='/ProductList/" & Section & "/NULL/" & MinPrice & "/" & MaxPrice & "/" & Search & "'>" & Manufacturer & "- Remove Selection</a></li>")
%>--%>
<% Response.Write("<li><a href='/productlist.aspx?Section=" & Section & "&MinPrice=" & MinPrice & "&MaxPrice=" & MaxPrice & "&Search=" & Search & "'>" & Manufacturer & "- Remove Selection</a></li>")
%>
</ul>
<%End If%>
in above url I want
http://xyz.com/productlist.aspx?Section=Terminals&Manufacturer=Lenovo pc & NetStaions
|
|
|
|
|
For passing any special character through QueryString, It is safe to use HttpUtility.UrlEncode()
Following example will serve your purpose:
string query = "City=" + HttpUtility.UrlEncode(txtCity.Text);
query += "&Hotel=" + HttpUtility.UrlEncode(txtHotel.Text);
Response.Redirect("page1.aspx?" + query)
Hope this will help.
|
|
|
|
|
Sorry ! I haven't seen your post before reply .
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
|
You can encode the url before sending using urlencode and do the reverse while receiving.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi everybody,
I've a web service which has following classes:
NOTE: Some code, i.e. local variables etc, is removed for brevity.
[Serializable]
public class ResponseCode
{
public string ErrorCode
{
return _errorCode;
}
public string ErrorDescription
{
get { return _errDescription; }
}
}
[Serializable]
public class BaseResponse
{
public ResponseCode Result
{
get { return _respCode; }
set { _respCode = value; }
}
}
public class AuthenticationResponse : BaseResponse
{
public int Credit
{
get { return _credit; }
set { _credit = value; }
}
public int UserID
{
get { return _userID; }
set { _userID = value; }
}
}
Now there is the web method, which performs the authentication and returns the AuthenticationResponse object as following:
On successfull authentication:
User ID: xxxx where xxxx is number
Credit: xxxx where xxxx is number
ErrorCode: 0 (zero means no any error)
ErrorDescription: OK
On failure:
User ID: 0 (zero)
Credit: 0 (zero)
ErrorCode: xxxx (different number for different reasons)
ErrorDescription: xxxx (different text for different reasons)
If you'll see the classes above expected returned XML should be something as following:
<AuthenticationResponse>
<Result>
<ErrorCode>1020300</ErrorCode>
<ErrorDescription>Invalid username or password</ErrorDescription>
</Result
<Credit>0</Credit>
<UserID>0</UserID>
</AuthenticationResponse>
But the returning result is as following:
<AuthenticationResponse>
<Result />
<Credit>0</Credit>
<UserID>0</UserID>
</AuthenticationResponse>
In short, Result property belongs to the base class BaseResponse which is type of an other class ResponseCode . Hence property of base class is not serialized to XML.
How I can include the base class's property serialized to achieve the desired result?
In start BaseResponse was abstract class. I removed abstract keyword but no luck. I've played a lot with XmlIncludeAttribute also but problem still exists
Any body can point me to right direction?
Thanks in advance
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
I found the reason of the problem and solved it.
Problem was in class ResponseCode . It's properties ErrorCode and ErrorDescription has ONLY get accessor while set accessor is needed to be shown in XML. I just added set accessor and result was as expected.
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|