|
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
|
|
|
|
|
thanks I have read from there some pages ... still more explicit tutorial will be needed
|
|
|
|
|
Take one component at a time and work with that. Search for HowTo: on google for that particular component.
Try to implement it. Then when you have tried and get stuck, or have issues come back and ask specific questions. Now a specific question looks like this;
--------
I am trying to integrate [XYZ component] onto my page, however [this is hapening], and i get [this error] at [this line of code]; The code i am using is below;
[insert correctly formatted code snippet]
--------
|
|
|
|
|
All right guys...I am sorry if I disturb you.
I will try to explain again my scenario:
We are developing a website which deals with hotels. A hotel will come to create an account on our website. They will register, for example, new rooms. When that happens need to post on their page of Facebook a message.
First question: Is this possible? And how? I created from developer.facebook an app. Then how will the message me sent without having to press a button.(i am thinking for a webservice).
I will come on with other questions...
Thanks in advance, adrian
|
|
|
|
|
I want to insert row to table(which is asp.net control)
after first click, row was inserted to table(list3_table.Rows.Count == 1)
but after i click again, list3_table.Rows.Count is 0 (i am checking when page_load event)
why the list3_table can't save row?
and how can i solve this problem?
aspx
<asp:table id="list3_table" runat="server">
cs.
protected void Button1_Click(object sender, EventArgs e)
{
TableRow tr = new TableRow();
TableCell tc = new TableCell();
Literal gradeLister = new Literal();
gradeLister.Text = list1_drop.SelectedValue;
tc.Controls.Add(gradeLister);
tr.Controls.Add(tc);
list3_table.Controls.Add(tr);
}
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Have you looked at using a Gridview control on your page ?
|
|
|
|