|
krishnaveer wrote: but after assigning when user will click it will be open in outlook
this mail id will be change time to time
So what is the problem ? Your requirement is opening outlook, right ? When email address changes, this link also will change.
|
|
|
|
|
ya exactlly
krishna veer singh
|
|
|
|
|
i want to make sach a web site in which when user open it.
in diffrent country its index page matter will be change
if any one know plz help me
thanks in advanced
krishna veer singh
|
|
|
|
|
You need to create the culture specific resource file in which you wnat translate.
You can number of articles about the localization on Google and CodeProject.
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
can u send me link for that
from where i can see
krishna veer singh
|
|
|
|
|
You can also create an xmldocument and give the translation for the entire website and use the custom labels to display the words for specific languages as selected by the user.
Sathy
|
|
|
|
|
Hi
I am having 2 webpages
Monitor.aspx
MonitorDetails.aspx
I want to pass the values of a dropdownlist in Monitor.aspx page to monitordetails.aspx page on button click even on Monitor.aspx page.
The code that i added in page_load event of MonitorDetails.aspx page is as follows
If Not Page.PreviousPage Is Nothing Then
Dim SrcDropDown As New DropDownList
SrcDropDown = CType(PreviousPage.FindControl("Content1_DropDownYear"), DropDownList)
If Not SrcDropDown Is Nothing Then
label1.Text = SrcDropDown.Text
End If
End If
Note: Here am using Master Pages and "Content1" is the ID of the content am using in masterpage
But always an error is coming for me like
"Object reference not set to an instance of an object."
Somebody pls help me to solve this
Its very urgent for me
|
|
|
|
|
(1) On which line raise this error ?
(2) What you written on button click event ?
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
Hi,
Can some body please tell me, of how to prevent ASP.Net pages from being cached,
Each time i request the page, it retreives the page from the cached ones, then to reflect the new changes, i have refresh it every time,
Thanks in advance
|
|
|
|
|
Put this tag in the html head section to tell the browser not to cache:
<meta http-equiv="Cache-Control" content="no-cache" >
or write the on Page Load event
Response.Cache.SetCacheability(HttpCacheability.NoCache)
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
there is no effect with the two solutions provided, could u pls suggest some other alternative
Thanks
|
|
|
|
|
Please go through this URL. It's have the all scenario.
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
Anuradha612 wrote: Can some body please tell me, of how to prevent ASP.Net pages from being cached,
As I told in my previous replies to you, it's your browser problem. Have you checked in other machine ? Usually ASP.NET won't cache any data if you are not telling it to do. Check your browser settings. Check the same page in another machine.
|
|
|
|
|
Hi,
I have a top.ascx (Control page) and index.aspx. All other aspx page having top.ascx as a simple menu in it.
In my top.ascx page it having a site search function that calls sitesearch.aspx page. Problem is sitesearch.aspx page having another built-in search function just like how normally web site will have.
If i query search using sitesearch.aspx page, then the page display smoothly. BUT if i search using top.ascx, it goes blank.
sitesearch.aspx calling "Search()" function to perform the search in its code behind.
How can i ask top.ascx page to call this function "Search()" directly so that it can run the search? Is there any way to do?
I try server.transfer or even postbackurl but non seem working. Maybe i miss out something. Pls help.
Thx.
|
|
|
|
|
What i understand :
When you click on top.ascx saerch function then pass the paramter via session to sitesearch.aspx and on page load check if session is not null then call your sitesearch.aspx search method otherwiese just open the page.
If i am not getting your point then let me know.
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
Are you allowed to pass search query through URL to search.aspx, and call the Search() function located inside it ?
|
|
|
|
|
Hi all,
i am using asp.net 2.0 with c#.
i am browsing one image with fileupoad control and
now i am trying to insert this image in to mysql database.
how its pzbl.also want to check size restriction
plz help me.its a bit urgent fr me
any sample code is appreciable.
Thanks and regards
Y.A.Krishna Prasad
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
Go on, fill your boots[^].
yadlaprasad wrote: its a bit urgent fr me
It's always urgent. Every tedious post. Urgent. Listen matey, this may be the thing that's keeping you up on a night, but I can't really bring myself to give a flying fart about it. You come in here without doing any research, spew your text speak all over the place and then want us to do your thinking for you. No, I say, no. Learn to do some research for yourself. Google should be your first port of call.
|
|
|
|
|
Sometime within the last week some code broke which I'm pretty sure hasn't changed. It's a simple DropDownList bound to a Country table in the database.
The data in the table hasn't changed. The code for that page hasn't changed. The web.config hasn't changed. And all the other pages which talk to the DB work. If I checkout the codebase and get it running on my home system it works including the DropDownList with countries.
here's the offending code snippet
<br />
IDataReader dr = DB.GetRS("select * from Country " + DB.GetNoLock() + " where Published = 1 order by DisplayOrder,Name");<br />
BillingCountry.DataSource = dr;<br />
BillingCountry.DataTextField = "Name";<br />
BillingCountry.DataValueField = "Name";<br />
BillingCountry.DataBind();<br />
dr.Close();<br />
BillingCountry.SelectedIndex = 0;<br />
the simple markup
<br />
<asp:DropDownList ID="BillingCountry" runat="server" OnSelectedIndexChanged="BillingCountry_OnChange" AutoPostBack="True"></asp:DropDownList><br />
the query implementation
<br />
static public IDataReader GetRS(String Sql)<br />
{<br />
SqlConnection dbconn = new SqlConnection();<br />
dbconn.ConnectionString = DB.GetDBConn();<br />
dbconn.Open();<br />
SqlCommand cmd = new SqlCommand(Sql, dbconn);<br />
return cmd.ExecuteReader(CommandBehavior.CloseConnection);<br />
}<br />
and the error it produces
<br />
'BillingCountry' has a SelectedValue which is invalid because it does not exist in the list of items.<br />
Parameter name: value <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.ArgumentOutOfRangeException: 'BillingCountry' has a SelectedValue which is invalid because it does not exist in the list of items.<br />
Parameter name: value<br />
<br />
Source Error: <br />
Line 442: BillingCountry.DataTextField = "Name";<br />
Line 443: BillingCountry.DataValueField = "Name";<br />
Line 444: BillingCountry.DataBind();<br />
Line 445: dr.Close();<br />
Line 446: BillingCountry.SelectedIndex = 0;<br />
It's throwing the exception on the call to DataBind().
The odd part is that it says the SelectedValue doesn't exist in the list of items yet its looking for the item "United States" which it got from the database! Here's a SS of the results returned by the above query country.jpg[^].
At this point I assume its some DB related component on my system that's gone bad but I'm not too familiar with the inner workings enough to know what to look into. Any suggestions on what to look at / reinstall / uninstall? Have any of the recent MS updates affected the components involved here?
Todd Smith
|
|
|
|
|
http://www.west-wind.com/weblog/posts/2068.aspx[^]
After hours of searching I finally landed upon this thread. I fixed bug by setting SelectedValue = null before the call to DataBind.
<br />
IDataReader dr = DB.GetRS("select * from Country " + DB.GetNoLock() + " where Published = 1 order by DisplayOrder,Name");<br />
BillingCountry.SelectedValue = null;<br />
BillingCountry.DataSource = dr;<br />
BillingCountry.DataTextField = "Name";<br />
BillingCountry.DataValueField = "Name";<br />
BillingCountry.DataBind();<br />
dr.Close();<br />
BillingCountry.SelectedIndex = 0;<br />
Not sure what changed which caused this to start happening all of the sudden but at least it works now.
I especially like this reply to the above thread:
This error is VERY confusing.. my code works fine on one server, but not on another???
Todd Smith
|
|
|
|
|
I got this exception once a day on my website, and subsequent visit to the web site is fine. I debugged through my code and the connection state is always 'Closed' on any connection even when there is no problem. I guess Enterprise library is handling connection automatically, but why do I get this exception once a day? I am using .NET2.0, Sql2000 and Enterprise library (2.0)
Here's the code:
public static DataTable GetDataTable(string procName) {
DataSet dataSet = new DataSet();
try {
Database database = DatabaseFactory.CreateDatabase("myProject");
//use GetSqlStringCommand so that it accepts sp with parameter
command = database.GetSqlStringCommand(procName);
dataSet = database.ExecuteDataSet(command);
}
catch(Exception exception) {
Utilities.ProcessException(exception, procName);
}
return dataSet.Tables[0];
}
And here's the exception:
Message:Invalid operation. The connection is closed.
Source:System.Data
Method:System.Data.SqlClient.SqlInternalConnection GetOpenConnection()
Stack Trace: at System.Data.SqlClient.SqlConnection.GetOpenConnection()
at System.Data.SqlClient.SqlConnection.get_Parser()
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableName)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command)
at DataAccess.GetDataTable(String procName) in d:\Inetpub\www\wwwroot\data\App_Code\DataAccess.cs:line 81
|
|
|
|
|
Without having a look at the rest of your code we can only make educated guesses, but have you checked to see if the connections have been closed and disposed?
|
|
|
|
|
Thanks for the reply, Pete.
My application uses ApplicationBlock code which takes care of connection open or close. I stepped into the ApplicationBlock code, just like the trace printed out during the exception, it goes to the DoLoadDataSet function. Here's snippet from that function
private void DoLoadDataSet(DbCommand command, DataSet dataSet, string[] tableNames)
{
using (DbDataAdapter adapter = GetDataAdapter(UpdateBehavior.Standard))
{
((IDbDataAdapter)adapter).SelectCommand = command;
adapter.Fill(dataSet);
}
}
Before and after adapter.Fill, the connection is always closed. Also, based on the stack trace, Enterprise library opens connection, fills dataset and close connection immediately. This is what I want, and it is working most of the day, except 1 exception a day.
|
|
|
|
|
I have created a simpe web control for geting rss news from bbc. this method I have is:
private DataTable GetRssDataFeed()
{
DataTable RssTable = new DataTable("RssTable");
DataColumn dtCol;
DataRow dtRow;
// Create Title column and add to the DataTable.
dtCol = new DataColumn();
dtCol.DataType = System.Type.GetType("System.String");
dtCol.ColumnName = "Title";
dtCol.Caption = "Title";
// Add the column to the DataColumnCollection.
RssTable.Columns.Add(dtCol);
// Create Description and add to the DataTable.
dtCol = new DataColumn();
dtCol.DataType = System.Type.GetType("System.String");
dtCol.ColumnName = "Description";
dtCol.Caption = "Description";
// Add the column to the DataColumnCollection.
RssTable.Columns.Add(dtCol);
// Create Link and add to the DataTable.
dtCol = new DataColumn();
dtCol.DataType = System.Type.GetType("System.String");
dtCol.ColumnName = "Link";
dtCol.Caption = "Link";
// Add the column to the DataColumnCollection.
RssTable.Columns.Add(dtCol);
// Create Title Description and add to the DataTable.
dtCol = new DataColumn();
dtCol.DataType = System.Type.GetType("System.String");
dtCol.ColumnName = "Publication Date /Time";
dtCol.Caption = "Publication Date / Time";
// Add the column to the DataColumnCollection.
RssTable.Columns.Add(dtCol);
// Create a new XmlTextReader from the specified URL (RSS feed)
rssReader = new XmlTextReader(rssUrl);
rssDoc = new XmlDocument();
// Load the XML content into a XmlDocument
rssDoc.Load(rssReader);
// Loop for the <rss> tag
for (int i = 0; i < rssDoc.ChildNodes.Count; i++)
{
// If it is the rss tag
if (rssDoc.ChildNodes[i].Name == "rss")
{
// <rss> tag found
nodeRss = rssDoc.ChildNodes[i];
}
}
// Loop for the <channel> tag
for (int i = 0; i < nodeRss.ChildNodes.Count; i++)
{
// If it is the channel tag
if (nodeRss.ChildNodes[i].Name == "channel")
{
// <channel> tag found
nodeChannel = nodeRss.ChildNodes[i];
}
}
// Loop for the <title>, <link>, <description> and all the other tags
for (int i = 0; i < nodeChannel.ChildNodes.Count; i++)
{
// If it is the item tag, then it has children tags which we will add as items to the DataGrid1
if (nodeChannel.ChildNodes[i].Name == "item")
{
nodeItem = nodeChannel.ChildNodes[i];
// Create a new row in the datagrid containing information from inside the nodes
dtRow = RssTable.NewRow();
dtRow["Title"] = nodeItem["title"].InnerText;
dtRow["Description"] = nodeItem["description"].InnerText;
dtRow["Link"] = nodeItem["link"].InnerText;
dtRow["Publication Date /Time"] = nodeItem["pubDate"].InnerText;
RssTable.Rows.Add(dtRow);
}
}
return RssTable;
}
...
in my on PageLoad:
protected void Page_Load(object sender, EventArgs e)
{
//this.txtResults.Text = GetRssDataFeed();
DataTable A = GetRssDataFeed();
this.DataGrid1.DataSource = A;
this.DataGrid1.DataBind();
}
When I run this, I see nothing, now datagrid control, no data, and I just cant seem to work out why this does not work. If I use the debugger, I can see that it does get the data!!!! Just a little confused here! </description></link>
My bad! It seems i did not set the width property correctly!
modified on Thursday, January 10, 2008 3:56:43 PM
|
|
|
|
|
Through my asp net web application i need to be able to add tasks and meeting information to my calendar in outlook 2003. I am unable to do so using the normal outlook api. I read that in some sites that i wont be able to use the APIs through ASP.net whereas the same code works fine when its a console application. Are there any other alternatives that help me achieve the same??
|
|
|
|