|
give the full path for assembly then it would work fine
give the full path for assembly then it would work fine
Mahendra
|
|
|
|
|
Hi,
In my project i wants to put few top news head lines. So i want to use RSS for it can any one help me to solve this point,
how use RSS in asp.net(C#) page.
and how i can get this top 10 news of the day.
(In Short:- I want to include an RSS aggregator in my Website)
Please.......... Help Me
Regard
manoj
|
|
|
|
|
Check out this link
http://aspnet.4guysfromrolla.com/articles/031903-1.aspx
Navi
|
|
|
|
|
|
Here i have 3dropdownlists in which i have to do the taask as,when i select item in dropdnlist1,the values in the dropdnlist2 should change,and when select item in dropdnlist2,the values should change in dropdnlist3.
Like if i select Statelist,it should come DIstricts in that state in the dropdnlist2.
How to do without any buttonclick event.
kissy
|
|
|
|
|
You can do it in the dropdownlist SelectedIndexChanged event i.e bind the second dropdownlist in the SelectedIndexChanged event of the first dropdownlist control.
Best Regards,
Apurva Kaushal
|
|
|
|
|
cmddis = New SqlCommand("select Distname from District", dbConn)
dtrdist = cmddis.ExecuteReader()
While (dtrdist.Read())
DistList.Items.Add(dtrdist("Distname"))
End While
dtrdist.Close()
This code i have given in state_selectedIndexedChanged ,but it is not showing any list in the secondlist.how to do,wat i have to use exactly.help me out
kissy
|
|
|
|
|
set the AutoPostBack property to true for statelistbox
rahul
|
|
|
|
|
I have State,Division,District lists.When I do the modifications as u said ,it is working good for the first two lists,but for the third list newly selected districts are appended to the previous list,
But my requirement is only those belongs to that divison only should shown in the list.It is simple but ,how to do.
Thanks for ur cooperation
kissy
|
|
|
|
|
In that case you need to change the sqlquery. You have to put the where condition in the query.
Something like this:
select Distname from District where division = "selected division".
Best Regards,
Apurva Kaushal
|
|
|
|
|
Yes it is working for the first time if i select DivisionList,But if i select secondtime,the district names belongs to that selected division are appending to the previous one,bcz i think autopostbak=true.
But i need only belongs to that perticular division.
kissy
|
|
|
|
|
No that is happening because you are appending the items in the dropdown list control. First cleat all the items in the datalist and then add the items in the list.
Best Regards,
Apurva Kaushal
|
|
|
|
|
cmddiv = New SqlCommand("Select Divi_id from Division where Divi_Name='" & DivList.SelectedItem.Text & "'", dbConn)
num = cmddiv.ExecuteScalar()
cmddis = New SqlCommand("select Distname from District where Divi_id=" & num & "", dbConn)
dtrdist = cmddis.ExecuteReader()
While (dtrdist.Read())
DistList.Items.Add(dtrdist("Distname"))
End While
dtrdist.Close()
but this is when page is loaded,if we select a divison,it displays districts,again if i selct a division,it appends the new districts to the previous list,how to clear the list in the code.
kissy
|
|
|
|
|
I suppose this is the same code which you put in change event also. Any way before executing this part clear the items like this:
DistList.Items.Clear();
This should be the first statement.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Here for the first time when i select a state that will not display.Same happening in DIvision also.If i select second time all are working properly.so wat to do for this??? a
and i have a code like
Dim cnt As Integer
cmdcnt = New SqlCommand(" Select MAX(Centre_Id) from Division_District where District_Id='" & num & "'", dbConn)
cnt = cmdcnt.ExecuteScalar()
If cnt = 0 Then
cnt = 1
if max is null the nhow to compare that value with ordinary integer.Like Isdbnull() or something.
kissy
|
|
|
|
|
Check the autopost back property as rah_sin has said.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi all,
I need to set RSS 2.0 to my web site. can any body tell me that actually what is RSS 2.0 and why it used for? and How to set the RSS 2.0 to my site. if any body gives the solution in their words instead of providing links it would be appreciated. Thanks in advance
Thanks and Regards
Venkat
|
|
|
|
|
Dear venkatasivaramaprasad,
RSS stands for Rich Site Summary or Really Simple Syndication. It is designed to allow individuals to distribute news or articles in a format that is easy for programs to read i.e XML. This allows you to gather relevant content from other sites without needing to rewrite the content or update articles on your site. you can get RSS-Syndicated content from http://moreover.com
With regards,
Suresh Dayma
|
|
|
|
|
Can ne 1 tell me how do i bind datagrid to ajax function. there can i do the adding and deleting data in datagrid using ajax
|
|
|
|
|
please help...............
I have an asp page i have to include that page in my .net page when i include this page it throws an error on every line. i have set aspcombat=true but no effect can u suggest how can i include the asp page in .net page
|
|
|
|
|
You can use ASP and ASP.NET pages in the same application, but you can't mix ASP code and ASP.NET code in the same page.
You can use an iframe to display the ASP page.
---
b { font-weight: normal; }
|
|
|
|
|
Hi All
I have a detailsview in Insert Mode and want to populate the myID field on insert with a new index number.
What I am doing is checking the last index number and adding 1. Then I want to put this value in to the Detailsview myID field in read only so users can not change it.
I want this to happen on the Detailsview_Inserting event. See code below....
<br />
Protected Sub DetailsView1_ItemInserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles DetailsView1.ItemInserted<br />
If DetailsView1.CurrentMode = FormViewMode.Insert Then<br />
LoadData()<br />
<br />
'Get max entry in table myID field.<br />
<br />
'Increment by one.<br />
<br />
'Add to the myID field in the dateview.<br />
<br />
End If<br />
End Sub<br />
Private Sub LoadData()<br />
Dim oleConn As New OleDbConnection<br />
oleConn.ConnectionString = ConfigurationManager.ConnectionStrings("ShowRegDBConnectionString").ConnectionString<br />
<br />
Dim oleComm As New OleDb.OleDbCommand<br />
oleComm.Connection = oleConn<br />
<br />
Try<br />
oleConn.Open()<br />
<br />
oleComm.CommandText = ("SELECT Max(myID) FROM SuggestionTB")<br />
Dim myID As String = Convert.ToString(oleComm.ExecuteScalar())<br />
<br />
oleConn.Close()<br />
<br />
LastValue = myID<br />
<br />
Catch ex As OleDbException<br />
oleConn.Close()<br />
End Try<br />
End Sub<br />
Any ideas....
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
I have four dropdownlists and a button on a page. all 4 of them get their data from database based on the selection of the dropdownlist before themselves. After the user selected all the dropdownlist, I will click the button, and a server side function will be called, then the same page should be displayed again with all the previous selection.
I DID use !IsPostBack on Page_Load, all the server controls are populated when !IsPostBack. However, after I clicked that button, only the first dropdownlist keeps its selection, the next three becomes blank. I even created a dummy button on the same form so that on clicking it nothing happens except PostBack, but same thing happened. Only first dropdown list keeps its selection. Why? how do I solve this?
|
|
|
|
|
Do all of the dropdowns use AutoPostBack? Are you populating them again during postback?
only two letters away from being an asset
|
|
|
|
|
Someone here thinks making the url more readable and hiding the technology we use is a priority and I need to do it.
So, I wrote an HttpModule that does some url rewriting, first if you have an address without an extension it gets that page plus .aspx. I.e. if you typed "http://www.mysite.com/users" into your address bar, users.aspx would be loaded (though the url would stay the same). This works fine. Also, this module will take pages with an extension written in, remove it, and refresh the page. For example, if you typed in "http://www.mysite.com/users.aspx" (or .cfm, php, etc) the module would parse the url, and do a Respone.Redirect to "http://www.mysite.com/users" where it is then processed as described above.
However, the problem comes in when I try to use the login control built into asp.net 2.0. After you click the log in button I get a 404 error on default.aspx in ~/. If I disable my HttpModule everything works fine. Anything wrong with what I have or is there something the login control does automatically that interferes with it? Like Server.Transfer?
Here is the code for the module:
using System;
using System.Collections.Generic;
using System.Web;
namespace BEAR.UrlRewriter
{
public class ExtensionWriter : IHttpModule
{
private HttpApplication application;
private List<string> ext;
public void Init(HttpApplication application)
{
string[] exten = { "asp", "aspx", "pl", "cfm", "php" };
this.ext = new List<string>();
foreach (string s in exten)
ext.Add(s);
this.application = application;
this.application.BeginRequest += new EventHandler(this.BeginRequestHandler);
}
protected virtual void BeginRequestHandler(object sender, EventArgs e)
{
string url = this.application.Request.Path;
string[] path = url.Split(new char[] { '/' });
string[] location = path[path.Length - 1].Split(new char[] { '?' });
string file = location[0];
string[] splitFile = file.Split(new char[] { '.' });
if (splitFile.Length == 1)
{
string newPath = string.Empty;
foreach (string s in path)
newPath += s + "/";
newPath += file + ".aspx";
if (this.application.Request.QueryString.HasKeys())
newPath += "?" + this.application.Request.QueryString.ToString();
this.application.Context.RewritePath(newPath);
}
else if(splitFile.Length > 1 && ext.Contains(splitFile[1]))
{
string newPath = string.Empty;
foreach (string s in path)
newPath += s + "/";
newPath += splitFile[0];
if (this.application.Request.QueryString.HasKeys())
newPath += "?" + this.application.Request.QueryString.ToString();
application.Response.Redirect(newPath.ToLower());
}
}
public void Dispose() { }
}
}
|
|
|
|