Thanks for responding. That was the issue.
Albert83
Posts
-
HttpContext values are lost during AJAX call after Adding masterpage -
HttpContext values are lost during AJAX call after Adding masterpageit's been several days since I am trying to resolve this issue. I have a page that is a mail inbox in the website. You can send messages to your friends from the list like on facebook. It has AJAX code in a js file, 2 ashx files, and aspx, aspx.cs files. I was using facebox pop up when a user wanted to send a message to a friend. Now I changed the UI removed facebox and added a masterpage so that now the page is like any other page on the site. But after adding a masterpage to messages.aspx page the values of HttpContext become null after I click on send message. They are working fine when the page first loads that shows friends list and previous messages. It's when I fire a js function to save the message entered by clicking send that it's lost. in message.aspx page I use 3 hidden fields: function SavePostedMessage() { var SenderAccountID = $("#hdnSenderID").val(); var ReceiverAccountID = $("#hdnReceiverID").val(); var Days = $("#hdnDays").val(); var body = GetmessageData(); if (body != null || body != "") SaveMessageInDatabase(SenderAccountID, ReceiverAccountID, body, Days); }
Send In messages.aspx.cs I put in page_load the code to register a js function: ScriptManager.RegisterStartupScript(this, typeof(string), "Play", "javascript:GetMessageConversation('" + Request.QueryString["AccountID"] + "','" + _userSession.CurrentUser.AccountID + "','7');", true); In Ajax.js I defined function GetMessageConversation(SenderAccountID, ReceiverAccountID, Days) { $("#hdnSenderID").val(SenderAccountID); $("#hdnReceiverID").val(ReceiverAccountID); $("#hdnDays").val(Days); $("#divPostComment").show(); setSelected("trUser" + ReceiverAccountID); $.ajax({ type: "POST", url: "/MessageFacebox/GetMessageConversation.ashx", data: 'SenderAccountID=' + SenderAccountID + "&ReceiverAccountID=" + ReceiverAccountID + "&Days=" + Days, success: function (data) { $('#messageconversationdata').html(data); Scrollbottom(); }, error: function (errordata) { alert('Sorry some error occurred');
-
Can't figure out how to covnert this XML to XSL for a gridviewHi, I am trying to bind a XML file to a grdiview and get an error: The data source for GridView with id 'gvPhotos' did not have any properties or attributes from which to generate columns. Ensure that your data source has content. I found out that I have to make and xsl format to solve this issue. Here is the original XML file. What's the correct XSL format for it ? Thanks for the time and effort. <gallery> <settings> <imagesFolder>friedmans-admin/Photos/</imagesFolder> <bgImage alpha="100" source="images/bg.jpg"/> <image align="center" cornerRadius="0" scaleMode="fill" transitionEffect="fade" useShadow="true"/> <thumbnail width="60" height="40" cornerRadius="0" alpha="70" outlineColor="0xFFFFFF" outlineColorOnRollOver="0xFFFFFF" outlineColorOnClick="0x8B0000" useShadow="true" usePreview="true"/> <thumbBar scrollSpeed="10" position="bottom"/> <preview alpha="100" width="200" height="100" outlineColor="0xFFFFFF" useShadow="true" cornerRadius="0"/> <caption position="bottom" visibleMode="onRollOver" bgAlpha="30" color="0xFFFFFF" bgColor="0x000000" fontName="Verdana" fontSize="12"/> <slideshow start="false" delay="3" loop="true" stopAutoOnClick="true"/> <preloader alpha="100" usePreloader="true" /> <buttons fullScreenButton="true" navigationButtons="true" slideshowButton="true" /> <sounds onRollOver="sounds/over.mp3" onClick="" /> <picasa user="" albumID="" /> </settings> <items> <item source="1.jpg" thumb="" description="Image 1" link="http://flash-gallery.com" target="_blank"/> </items> </gallery>
-
Spent hours, can't figure out. Javascript dynamic form variable with asp.netThanks that worked!
-
Spent hours, can't figure out. Javascript dynamic form variable with asp.netThanks. This is the code I have used: var fieldIs = document.getElementByID(fieldName).value; And I have added id as follows: Is that how it should be?
-
Spent hours, can't figure out. Javascript dynamic form variable with asp.netThanks for the response. I am getting an error in firefox: Error: document.getElementByID is not a function
-
Spent hours, can't figure out. Javascript dynamic form variable with asp.netHi I have a form with text fields that I am trying to validate. I get this error and validation fails. Firefox error Console shows: Error: document.Registring.elements.fieldName is undefined It doesn't recognize fieldName as variable. Without runat="server" I think the issue disappears. How to fix this? Thank you. Here is the snippet: function checkform(fieldName) { var fieldIs = document.Registring.elements[fieldName].value; if (fieldIs == "") return false; else return true; } function ValidateFields() { var errorMessage = ""; var returnResult = true; //Personal Information if (!checkform('FirstName')) { errorMessage += "First Name is a required field \n"; returnResult = false; } if (!validateInputType('FirstName', "letters")) { errorMessage += "First Name should contain letters only \n"; returnResult = false; } } function validateInputType(fieldName, inputType) { if (inputType == "digits") { var isNumber = document.Registring.elements[fieldName].value; //digits only if (isNumber.match(/^\d+$/)) return true; else return false; } else if (inputType == "letters") { var isLetter = document.Registring.elements[fieldName].value; //letters only if (isLetter.match(/[a-zA-Z]/)) return true; else return false; } } Reservations
PERSONAL INFORMATION
-
Login fails with ASP.NET membershipActually the data was in the tables. The application name in web.config should match the applicaion name in the asp_applications table.
-
Login fails with ASP.NET membershipThanks for the answer.
-
Login fails with ASP.NET membershipThe initial response was correct the asp membership data was not transferred. It was another table that showed the error.
-
Login fails with ASP.NET membershipThis was resolved. Thanks.
-
Login fails with ASP.NET membershipThe username is in the database. That's the thing. I checked it. When I try to register same user it throws a duplicate record error for the username. That's a confirmation that it's in the db.
-
Login fails with ASP.NET membershipHi, I am using asp.net built in membership mechanism for registration and login in. I recently transferred a website to a different hosting including the sql server database. After transferring the website all the previous user who registered now can't login with their user name and password. Password recovery says that the user name doesn't exist. However, new account registration works and there is no problem logging in with the new account. Does anyone know what the problem is? Thank you for the time.
-
Ad Rotator Error when using link parametersI posted, in the question...there is a query string parameter there.
-
Ad Rotator Error when using link parametersthe way you use it works fine. if you add a querystring parameters it stops working.
-
Ad Rotator Error when using link parametersHi and thanks for your interest. I am trying to use an ad rotator and as soon as I use parameters in the link it shows an error. If I remove the parameters it works. How can I use parameters in the link? Thank you.
http://www.flamingo.ru/bannerad/showban.asp?action=show&campaign=12345 http://www.flamingo.ru/bannerad/showban.asp?action=redir&campaign=12345 50
-
How to make a custom datalist controlOk. I will try seems to be pretty simple. Thanks.
-
How to make a custom datalist controlThanks. But how would I embed a general datalist inside the table? and then reuse it. The datalist id and contents will be different on various pages. The table is the same.
-
How to make a custom datalist controlHi, I have datalist which is inside a rounded cornered table. How can I reuse the table for multiple datalists without recreating the table every time..i.e table, tr, td..... I was thinking about a custom datalist control but I don't know how to do it. Any help appreciated. Thank you.
-
Need assistance with DataList Databinding! Don't know how to do it.I have a datalist which has a label in the template header. The label's visibility is false initially. After that I have the ItemTemplate It contains a label for a date which has visible = false initially after that I have a linkbutton for a category name. So when the page loads it will list categories vertically header = false, date= false. Each category is click able. When the user clicks on a category the category name will show in the header. The label's visibility in the header is set to true. Below it will be the subcategories. The label for sub category date visibility = true and the link button is replaced with clickable sub categories instead of the main categories. How can I achieve this functionality? I would appreciate as many details as possible to achieve this. Thank you for reading.