|
|
Request the RSS feed from the Source site. and you will recieve response as XML. then populate the information from this XML. .Net framework does provide the API to request RSS feed.
Parwej Ahamad
|
|
|
|
|
Hi,
I have a asp:table on aspx Page. Im adding dynamic rows to the table.
The rows added dynamically are visible on the UI bt im unable to find those dynamically created rows in viewsource of the page.
i.e they are not being rendered. I want to access controls value inside the table cell. i have added textbox control in the table cell whose value i want to calculate.
How i can do that.
Thank you all for your replies.
modified on Monday, April 13, 2009 4:51 AM
|
|
|
|
|
Could you post here your line code way of inding the controls ?
Parwej Ahamad
|
|
|
|
|
<br />
<asp:updatepanel id="UpdatePanel3" runat="server" updatemode="always" enableviewstate="true" xmlns:asp="#unknown" /> <contenttemplate><br />
<br />
<table id="tblRateDetails" runat="server" borderwidth="2px" borderstyle="solid" enableviewstate="true"><br />
<contenttemplate><br />
<asp:updatepanel xmlns:asp="#unknown"><br />
<br />
In the .cs page the rows are added as:<br />
<br />
TableRow tr = new TableRow();<br />
<br />
TableCell tcPlace = new TableCell();<br />
<br />
Label lblPlaces = new Label();<br />
lblPlaces.Attributes.Add("runat", "server");<br />
lblPlaces.ID = "lblPlaces" + i;<br />
lblPlaces.Text = arrstrPlaces[i];<br />
<br />
tcPlace.Controls.Add(lblPlaces);<br />
tr.Cells.Add(tcPlace);<br />
<br />
<br />
TableCell tcRate = new TableCell();<br />
<br />
TextBox txtRates = new TextBox();<br />
txtRates.Attributes.Add("runat","server");<br />
txtRates.ID = "txtRates" + i;<br />
txtRates.Width = 50;<br />
txtRates.Attributes.Add("onkeypress", "fnAccpNumDecimal(event)");<br />
<br />
tcRate.Controls.Add(txtRates);<br />
tr.Cells.Add(tcRate);<br />
<br />
<br />
TableCell tcrfv_FD = new TableCell();<br />
<br />
RequiredFieldValidator rfv_FD = new RequiredFieldValidator();<br />
rfv_FD.Attributes.Add("runat", "server");<br />
rfv_FD.ID = "rfv_FD" + i.ToString();<br />
rfv_FD.ControlToValidate = txtRates.ID;<br />
rfv_FD.ErrorMessage = "Insert Rates";<br />
rfv_FD.Display = ValidatorDisplay.Dynamic;<br />
rfv_FD.SetFocusOnError = true;<br />
rfv_FD.Text = "*";<br />
rfv_FD.EnableClientScript = true;<br />
rfv_FD.ValidationGroup = "check";<br />
rfv_FD.Visible = true;<br />
rfv_FD.Enabled = true;<br />
rfv_FD.EnableViewState = true;<br />
<br />
tcrfv_FD.Controls.Add(rfv_FD);<br />
tr.Cells.Add(tcrfv_FD);<br />
<br />
<br />
tblRateDetails.Rows.Add(tr);<br />
<br />
<br />
</asp:updatepanel></contenttemplate></table></contenttemplate>
modified on Monday, April 13, 2009 5:40 AM
|
|
|
|
|
i am not getting error msg while validating textbox in gridview
i have put custom validator on textbox in grid
i have done this in gvStudent_RowDataBound
if (e.Row.RowIndex >= 0)
{
CustomValidator customValidator = new CustomValidator();
customValidator.ID = "CustomValidator1";
customValidator.ControlToValidate = "txtGrade";
customValidator.ErrorMessage = "Invalid Grade.";
customValidator.SetFocusOnError = true;
customValidator.ValidateEmptyText = true;
customValidator.ClientValidationFunction = "fnClientFunction";
e.Row.Cells[2].Controls.Add(customValidator);
}
and
this is function that i have wrritten in source side
function fnClientFunction(source, arguments)
{
if (arguments.Value=="AA" || arguments.Value=="aa" || arguments.Value=="AB" || arguments.Value=="ab" || arguments.Value=="BB" || arguments.Value=="bb"|| arguments.Value=="BC" || arguments.Value=="bc"|| arguments.Value=="CC" || arguments.Value=="cc"|| arguments.Value=="CD" || arguments.Value=="cd"|| arguments.Value=="DD" || arguments.Value=="dd"|| arguments.Value=="EE" || arguments.Value=="ee"|| arguments.Value=="FF" || arguments.Value=="ff"|| arguments.Value=="I" || arguments.Value=="i"|| arguments.Value=="RR" || arguments.Value=="rr")
arguments.IsValid=true;
else
arguments.IsValid=false;
}
can any body help me to sort out this problem.????
with regards
rahul
|
|
|
|
|
May i know what is JSON? and why we go for JSON...I am working in Asp.net, whether it is related to?
Thanks in advance.
Ramkumar
|
|
|
|
|
getramonweb wrote: May i know what is JSON?
JavaScript Object Notation
getramonweb wrote: and why we go for JSON
Because it is easy to use in JavaScript
|
|
|
|
|
JSON is an acronym to JavaScript Object Notation.
It is a lightweight data-interchange format. Can be used as an alternative to XML.
In asp.net, you can use JSON as a data-interchanger format with AJAX using DataContractJsonSerializer.
|
|
|
|
|
Hello,
This is Vikash again.
This time i have query related to my web site configurations.
I have one module in my website under the App_Code folder and I have put all the .aspx pages with code-behind files and sitemap file in another folder named 'Pages'.
Also i have put the Stylesheet file in the Pages folder. Now when I run the site from VS.net 2005 it runs well, but when I Compile the site and put the compiled site in IIS and run from browser, it does not take the stylesheet styles, Can anyone tell me why this happens?
Another thing is when i put all my files under root directory, it works fine even after compiling.
I also want to know that every time I Compile my site, it by default puts the Compiled DLL files in Bin directory. I don't want to use this Bin directory and want to put the compiled files in the 'Pages' folder where all my other files are present, How can i do this?
Anyone please can give some ideas on the above issues, would be of great help.
And Thanks in Advance.
|
|
|
|
|
Dear friends
any body help me to host silverlight project from local host(Step by Step Processors).
I have got lots of link but that are not help full . that very confusing in virtual directory and MIME Type. that link are not sufficient to understand of deployment of Silver Light Project please help me
discussion with lots of people also available on this link:-
http://www.codeproject.com/script/Forums/View.aspx?fid=1004257&msg=3001645
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
Eventure Technology
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
What is your IIS version ?
Parwej Ahamad
|
|
|
|
|
|
liz3 wrote: Does this have something to do with the user ASPNET?
Why are you trying to do this? What is your requirement? I think there is no reason to open a IE using Process.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Dear friends,
My ASP.Net site works perfectly in local network. But after uploading in the net, session times out frequently.
I have 2 session variable.One is declared ( CompanyTitle) at Global.asax(Session_Start event), another in login page ( userName). The session variable declared in Global.asax is available in all pages, the other variable is not. It gives an error as "Object variable is not set to an instance.....". After that I declared this variable in Global.asax(Session_Start event) with "" as its default value. Now the problem is that the UserName session variable is reset into "" frequently.
my session entry in web.config is as
<sessionstate mode="InProc" cookieless="UseCookies" timeout="60" />
Please advice me on this problem.
Shivanandan C V
modified on Monday, April 13, 2009 1:32 AM
|
|
|
|
|
Shivan Nandan wrote: my session entry in web.config is as
you web.config setting is not coming properly. While posting web.config setting, make sure you have checked "Ignore HTML tags in this message (good for code snippets)" Check box.
Shivan Nandan wrote: But after uploading in the net, session times out frequently.
You want to mean after deployed into IIS?
Shivan Nandan wrote: the other variable is not. It gives an error as "Object variable is not set to an instance.....".
How did you add the value in session?
Shivan Nandan wrote: Now the problem is that the UserName session variable is reset into "" frequently.
Means you are getting the value some times and its got reset frequently. Are you using any Application Pool in IIS ? Does it recycling for any reason ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
After deploying also , I get the same kind of error.But now I have uploaded all files ie, aspx,aspx.cs,cs,web.config,Global.asax etc.
The first variable is added in Session_Start event, as
Session.Add("CompanyTitle","XYZ")
The other variable in
protected void btnLogin_Click(object sender, EventArgs e)
{
// value retrieval code from Database
Session["UserName"]=UserName;
}
The problem is that whenever I retrieve the session variable "UserName" in some other page, nearly after 1 minute it gives the error "Object variable not set to an instance..."
Shivanandan C V
|
|
|
|
|
Shivan Nandan wrote: The problem is that whenever I retrieve the session variable "UserName" in some other page, nearly after 1 minute it gives the error "Object variable not set to an instance..."
It means you are getting the value from session for sometimes. Yes | No ?
Did you gone through all the questions that I have asked you earlier ? What is IIS settings fro Session Time Out, What about IIS Recycling ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hosting people told that they have set it to 60 minutes. About recycling I have no idea.
Shivanandan C V
|
|
|
|
|
Shivan Nandan wrote: About recycling I have no idea.
If you are confident about your code, then problem is only with the recycling of Application Pool. Ask you hosting people to create a separate application pool for you site and assign that application pool to your site, and then test.
Good luck !!
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Thank You
Shivanandan C V
|
|
|
|
|
Hi Friends
In one of Grid View columns ("Name"), if a name exceeds certain number of characters,the rest of the characters appears on the next line. Is there any way so that the column values should appear on the same line. I tried HeaderStyle Wrap = "false" RowStyle Wrap = "false" but nothing works.
Abhishek
Mumbai, India
modified on Monday, April 13, 2009 1:02 AM
|
|
|
|
|
Is it posible to send Email from localhost ? how?
shahdat
|
|
|
|
|
MD. SHAHDAT HOSAIN wrote: Is it posible to send Email from localhost ? how?
You have to Configure SMTP in your Local System. Please go through the given links, you will get the details of how to configure SMTP in your IIS.
How to: Install and Configure SMTP Virtual Servers in IIS 6.0
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
I am working with the dropdown List but while running the application if I am trying to select the items from the DropDown List I am Getting the Following Error:
Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
I have faced this problem many times but I am not getting why this problem is raised.
Can anybody tell me about this problem and why is tha raised????
Thanks
|
|
|
|