|
Hi
I managed to get this to work. I originally had the code in a try...catch block. When I removed the try...catch it worked perfectly. I cannot explain that.
Thanks for all the replies.
Kobus
|
|
|
|
|
Hi,
I am a beginner in asp.net-silverlight-WCF, i create a small database application using silverlight and WCF. I publish it in the local iis. Its working fine in my local machine but the WCF service is not working in the other machines is the same network.
How to publish it in the local network. I am also a beginner in web service too.
Thank You
YPKI
|
|
|
|
|
Hi Prakash,
The question you have ask is related to WCF, here in CP we already have forum for WCF questions.
If you ask question there you will get better answer there.
Regarding you question, WCF are little bit tricky customer. Check the URL and endpoint URL you are using, that may be case for not working WCF.
|
|
|
|
|
I'm trying to develop a Blackberry friendly web page which has aGridview on the page.
I have tried making the row "Selectable" (select hyperlink is shown) and adding command button as one of the columns in the grid. Neither one of those methods respond to a click by the Blackberry Browser.
Does anyone have a solution for this ?
|
|
|
|
|
I am not sure if i am answering this but...
David Mujica wrote: Blackberry friendly web page which has aGridview
GridView is bulky. I would suggest to use some repeater control, or something light weight and implement the required functionality using JavaScript.
|
|
|
|
|
Hello Everybody
Following code working fine in FF but not working in IE please help me out
function ManageQuantityDropDown() {
if ($("#<%=grdCustAllotedQuantity.ClientID%> table[id*='MainContent_grdCustAllotedQuantity_rdbCustomerRegistrationType'] input:radio:checked").val() == "0") {
$("#<%=grdCustAllotedQuantity.ClientID%> select[id*='MainContent_grdCustAllotedQuantity_ddlQunatity']").attr('disabled', true);
$("#<%=grdCustAllotedQuantity.ClientID%> select[id*='MainContent_grdCustAllotedQuantity_ddlQunatity']").attr('selectedIndex', 1);
$("#<%=hdnAllotedQuantity.ClientID%>").val($("#<%=grdCustAllotedQuantity.ClientID%> select[id*='MainContent_grdCustAllotedQuantity_ddlQunatity']").val());
}
else {
$("#<%=grdCustAllotedQuantity.ClientID%> select[id*='MainContent_grdCustAllotedQuantity_ddlQunatity']").removeAttr('disabled');
}
}
Thanks
modified on Tuesday, July 19, 2011 7:36 AM
|
|
|
|
|
meghamaharshi wrote: not working in IE
Explain your problem in detail. "Not working" is not a good explanation. Does it give you an error? What is it supposed to do?
|
|
|
|
|
Format your snippet. Use the "code block" toolbar item.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I'm creating a website where I'm using a LoginView control. The code for the control is:
<asp:LoginView ID="LoginView" runat="server">
<LoggedInTemplate>
<asp:Label ID="lblPrivateClassMessage" runat="server" Text="" Font-Bold="true" Visible="false"></asp:Label>
<asp:ImageButton ID="imgAddToCart" runat="server" ImageUrl="~/Images/AddToCart.png" Height="40px" Width="119px" Visible="false"/>
</LoggedInTemplate>
<AnonymousTemplate>
<asp:Login ID="MemberLogin" runat="server"
CreateUserText="Create a new user..."
CreateUserUrl="~/Members/Register.aspx"
PasswordRecoveryUrl="~/Members/RecoverPassword.aspx"
UserNameLabelText="E-mail address:"/>
</AnonymousTemplate>
</asp:LoginView>
I haven't created any code to handle registration or logging in yet, but the controls within the LoggedInTemplate are always being displayed. So I decided to add a LoginName control within the LoggedInTemplate to determine what user name the system is saying I'm logged in as. It displays my corporate login name; in the format MYCOMPANY\UserName. Since the website is interactive with our SQL server to manage products and such I am connected to our corporate network through VPN. If I disconnect from VPN I can't test and debug my website, but if I'm connected the website always has me logged in?
What can I do so when I first go to the web site pages, it does not have me logged in so I can test logging in, logging out, etc. The interesting thing is that on a previous site that I made I didn't have this problem, albeit I did not use a LoginView anywhere on the site. Any ideas, suggestions, etc. Thanks in advance for any help you can provide; it is very much appreciated as my company wants this site done in about 2 weeks.
|
|
|
|
|
Nevermind...I figured out the issue. In my web.config file I had the authentication mode set to "Windows" as opposed to "Forms".
|
|
|
|
|
Hi, Im working with this method. The problem is that Im creating a new page and then try to assing the Header.Title but it will throw and exception of NullReferenceException.
public static string RenderControl(string controlName)
{
Page page = new Page();
page.Header.Title = "New Page";
page.Controls.Add(header);
UserControl userControl = (UserControl)page.LoadControl(controlName);
userControl.EnableViewState = false;
HtmlForm form = new HtmlForm();
form.Controls.Add(userControl);
page.Controls.Add(form);
StringWriter textWriter = new StringWriter();
HttpContext.Current.Server.Execute(page, textWriter, false);
return textWriter.ToString();
}
Same thing if I try to add
HtmlLink myCSS = new HtmlLink();
myCSS.Href = "~/somecss1.css";
myCSS.Attributes.Add("rel", "stylesheet");
myCSS.Attributes.Add("type", "text/css");
Page.Header.Controls.Add(myCSS);
I try to set a new header but It says
page.Header
(Gets the document header for the page if the head element is defined with a runat=server in the page declaration.
but when you see the new Page() constructor it says <No Parameters> Cant set the header with attr runat=server when initialize the page.
Regards
modified on Monday, July 18, 2011 6:52 PM
|
|
|
|
|
I haven't implemented it ever but I think issue is with your code try this way:
HtmlHead head = new HtmlHead("head")
HtmlTitle title = HtmlTitle()
title.Text = "New Page";
head.Controls.Add(title)
page.Controls.Add(header);
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Hi,
I tried with below code for export gridview to Excell and it is adding empty row for every record . Please suggest me better way to do this.
My Code:
--------------
response.Clear();
response.ClearContent();
response.Buffer = true;
response.ContentType = "application/vnd.ms-excel";
response.Charset = "";
//--code to display multiline value in same cell in excel-------------------
string header = @"
";
response.Write(header);
response.AddHeader("mso-data-placement", "same-cell");
response.AddHeader("content-disposition", new StringBuilder("attachment; filename=").Append(fileName).Append(".xls").ToString());
}
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
gvControl.RenderControl(oHtmlTextWriter);
// response.Write(oStringWriter.ToString().Replace("bordercolor=\"white\"", String.Empty));
response.Write(Regex.Replace(oStringWriter.ToString().Replace("bordercolor=\"white\"", String.Empty).ToString(), @"(<a[^>]*>)|
()", " ", RegexOptions.IgnoreCase));
response.End();
---------------------------
Regards,
Vishnu.
|
|
|
|
|
Please Format your Code using "Pre" tag.
|
|
|
|
|
|
I have a basic login page. when a user is logged in, I want him to be redirected to a page with a success message and after 3 seconds, I want him to be redirected to my home page.
I know that I can use sleep time, but it's not recommended. So what's the best way to achieve it?
|
|
|
|
|
I think you can implement through refresh tag under head section:
You can use the META HTML tag to redirect the user. Below is an example:
<META HTTP-EQUIV="Refresh" CONTENT="10;URL=http://www.yourdomain.com/">
OR
Try with :
Response.AddHeader("REFRESH","10;URL=http://www.yourdomain.com");
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
You can use Javascript if you want:
setTimeout( 'window.location = "default.aspx";', 3000 );
You can excute that script from anywhere even in your codebehind.
Hope that helps
|
|
|
|
|
Hi All,
Is there any reporting Service which provide run time design.
I am using Crystal report.
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
What is a "run time design"?
|
|
|
|
|
Hi
I am creating an extranet site which will use windows-based-authentication (Digest Authentication; http://www.codeproject.com/KB/aspnet/ASPDOTNETauthentication.aspx).
My question is; when using WBA a windows login dialog is displayed for users to provide their credentials. Is there a way to use a web form for this without changing the authentication method? Ie: I would like windows to allow/deny access to the site but I want the user to enter their credentials into a nicely CSS formatted page rather than a nasty windows dialog!
Im very new to APS .NET and web design! Please speak slowly and simply; I wont be offended.
Thanks
|
|
|
|
|
Extranet site ... meaning it is hosted outside your corporate network. Right ?
I would think you would want to use Forms based authentication if it is a stand-alone website.
I am currently working on a website which will be using Forms based authentication and the ASP.NET membership provider. I am coding my own login pages and user maintenace pages for this application.
Things you might want to investigate.
AspNetSqlMembershipProvider
Membership.ValidateUser
Membership.GetUser
FormsAuthentication.RedirectFromLoginPage
Just some quick search terms for you to investigate.
I'll be glad to help you if this is the direction you want to go.
|
|
|
|
|
You cannot replace the default dialog with your own dialog (or webpage). But you can simulate this by using Forms Authentication, a custom login page and Active Directory API. You just have to authorize your users through the AD API.
|
|
|
|
|
Hi there. It might be possible that what I want to ask has already been discussed on another thread. Still I am not sure.
Here is the scenario:
Must develop a web application site in ASP.NET which deals with hotels. So: hotels will come to register on this site. When a hotel will register new rooms or some other action then the application will have to publish that action as a post on their Facebook account.
Q1: Who can tell me which are the steps to make it possible? I created an app for my website, also.
Q2: Can I test this on localhost? We have the domain but has yet no host.
|
|
|
|
|
This information is very cleverly hidden in what most developers call documentation.
http://developers.facebook.com/[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|