|
Hi,
Ajax doesn't always mean UpdatePanel.
When user clicks add new chart, Create a new XmlHttpRequet,
Send the request for the new chart to the server,
Get the new chart as a response from the server,
Then, add it to your page using javascript.
Postback is not needed in this case.
You may need to go through tutorials or book if facing problem.
|
|
|
|
|
Hi All,
Hope everyone had a Merry Xmas and Happy New Year.
Just a question...I have made an RSS Feed which is syndicated by the Mozilla and IE , as an output of an XML file. However when either of the feeds show, they show the pubDate as being totally different dates to what is shown in the XML file. Even when I look at the source, the XML file still shows the correct dates as opposed to what is shown in the browser.
What do you guys think is the problem? Heres my code. Cheers.
public static void CreateNewsFeed(string mappath)
{
FileStream fs = null;
StreamWriter sw = null;
try
{
using (SqlConnection conn = Connection.connect())
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = "ShowNewsFeed";
cmd.CommandType = CommandType.StoredProcedure;
SqlDataReader reader = cmd.ExecuteReader();
fs = new FileStream(mappath, System.IO.FileMode.Create, System.IO.FileAccess.Write);
sw = new StreamWriter(fs);
sw.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
//ISO-8859-1
//xmlns:atom=\"http://www.w3.org/2005/Atom\"
sw.WriteLine("<rss version=\"2.0\">");
sw.WriteLine("<channel>");
sw.WriteLine("<title>Company Name</title>");
sw.WriteLine("<link>http://www.companyname.com.au/Home/News/News.aspx</link>");
sw.WriteLine("<description>News and the latest updates</description>");
sw.WriteLine("<language>en-us</language>");
while (reader.Read())
{
DateTime dt = (DateTime)reader["datePosted"];
sw.WriteLine("<item>");
sw.WriteLine("<title>" + reader["title"].ToString() + "</title>");
sw.WriteLine("<link>http://www.companyname.com.au/NewsArticle.aspx?newsID=" + reader["newsID"] + "</link>");
sw.WriteLine("<description>" + reader["description"].ToString() + "</description>");
sw.WriteLine("<pubDate>" + dt.ToString("R") + "</pubDate>");
sw.WriteLine("</item>");
}
sw.WriteLine("</channel>");
sw.WriteLine("</rss>");
sw.Close();
fs.Close();
}
}
catch (Exception m)
{
throw new Exception(m.Message);
}
}
|
|
|
|
|
HELLO All
Recently i found this article about reporting with word document ,when i used the sample code it's working fine ,but rather plain , what if i want spice my report , i have an already designed word reports ,they are simple forms , when i saved them as XML i got this lengthy xml file ,now of course i have some blank cells , in the reports that i want to fill since the report is basically a table , here comes the headache ,HOW TO GET TO THE PARTICULAR NODE? i have solved this problem in a hard way i wonder if there is a better way DOES ANY1 KNOW AN EASIER WAY TO GET TO THE NODES AND OVERWRITE THEM? ANY GOOD ARTICLE ABOUT THIS TOPIC
THANX IN ADVANCE
by the way here is the hard solution of mine ,i first read copy xml file into .txt file then read it and indexof() the cell to know where is it exactly i want to insert my data the code would like like this
fp = File.OpenText("C:\Documents and Settings\Administrator.RFF-SRV0\Desktop\" & "NoteVactionXML.txt")
_ManipulationStr = fp.ReadToEnd()
Dim str, resl As String
resl = _ManipulationStr
Dim index As Integer = 0
str = "<w:r w:rsidrpr="" 00ea5324""="">" _
& "<w:rpr>" _
& "<w:rfonts w:cs="" simplified="" arabic""="">" _
& "<w:b>" _
& "<w:bcs>" _
& "" _
& "<w:t>" & "خن" & "" _
& ""
resl = resl.Insert(548 + 10566, str)
fp.Close()
strHTMLContent.Append(resl)
HttpContext.Current.Response.Write(strHTMLContent)
HttpContext.Current.Response.End()
HttpContext.Current.Response.Flush()
Do i have to do the above for each item?
I HOPE NOT
|
|
|
|
|
you are a very bold person
I am assuming you have an xml-document :
.Net has some classes you want : XmlReader and XmlDocument .
A search for those terms should give you plenty articles to read.
|
|
|
|
|
how creat word document in asp.net use by vb.net
|
|
|
|
|
Hi ,
Is there any Javascript/Jquery slider control for selecting a range of dates ?.Could you please let me know ?
With Warm regards..
|
|
|
|
|
|
I have a button and a repeater, its datasource is a list of strings. When I click on the button, a new item is added to the repeater's datasource and the page refreshes, but I can't see the change in the repeater till I refresh the page again. What should I do in order to see the changes immediatly?
|
|
|
|
|
Make sure you are rebinding the repeater control during postback. If you are doing this please show us the code.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
i want to allow the user to enter apostrophe in the name entered in the text box.. it cant be given as e.KeyChar == '''. can somebody help me i am new to this..
|
|
|
|
|
Currently, how are you validating your textbox?
|
|
|
|
|
i have just started when i was writing the code it showed me this error
|
|
|
|
|
\' maybe.
Why not use regular expression and do the validation in javascript?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
steps for how to pass parameters to crystal reports throug textbox or dropdownlist using asp.net with c#.net
in design time text box is not available in tool box how to take textbox or dropdownlist
|
|
|
|
|
Did you tried the solution given in your last post?
Are you facing any problem with that?
Search google, you'll find many examples of parameter passing to crystal reports.
|
|
|
|
|
in the tool box there is no textbox, dropdownlist controls then how to take values from these controls
|
|
|
|
|
I am using SQL SERVER to create a database, but I can not find the files in my PC.
if open it from SQL SERVER MANAGEMENT, it is shown as my-PC\SQLEXPRESS\database\system datatase\master\tables\dbo.TEST
actually TEST is one table I CREATEED. but I CAN NOT FIND IT IN THE EXPLORER.
who can tell me where is it located then?
thanks.
|
|
|
|
|
First and foremost. Never add tables to the master database. Create a new database and add it there. For express the default data location is usually C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data. Also, you cannot see specific tables in Windows Explorer, only the databases.
|
|
|
|
|
I'm using the full version so there may be some differences in Express (I'm not familiar with that product). That said, one way to determine where your .mdf / .ldf files for your db are located is to script the database. Right click on the database you've created, select Script Database As from the popup menu.
You may have to follow slightly different steps in Express, but the general idea here is to generate a CREATE DATABASE script. Having done so, you'll notice something along these lines:
CREATE DATABASE [YourDbName] ON PRIMARY
( NAME = N'YourDbName', FILENAME = N'C:\Whatever\The\Path\Is\YourDbName.mdf' , SIZE = 45056KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )...
There's more to the script of course, but the FILENAME portion will show you exactly where the db file lives. Sql Server uses .mdf files for the database, and .ldf for the log. If you want to move it to a new directory, be sure to move both files.
Hope this helps -
|
|
|
|
|
In my project i want to use crystal reports .but in crystal reports how to pass parameters(ie when user enters any no in textbox it
should display all deatails of that employe , and in dropdown list also the same )
|
|
|
|
|
|
hi everyone.
i am inserting values in the table
the code.
<br />
SqlCommand com=new SqlCommand();<br />
con.Open();<br />
com.CommandText="insert into tbl([Name],FName,Address) values('Angelina','Carlos','sedny')";<br />
com.Connection=con;<br />
com.ExecuteNonQuery();<br />
con.Close();<br />
This code is running perfectly no Exception occurs no Error.
it is also returning the rows effected. But after successful execution
the values are not inserting in the database.
and when i run the same query in QueryAnalyzer it is ok and inserting the values but from the Ado.Net it is not working.
i don't understand this problem.
can anyone help me in this regard?
thanks in advance.
|
|
|
|
|
Reconfirm if the connectionstring is perfect. I think it is inserting in some other database ...
If ADO.NET cannot insert in database, it will throw you an error.
|
|
|
|
|
sir thank you for your reply
i have checked the connectionstring it is ok.
and i have no other database with same name and table, columns
only the select query work.
nor update and nor delete and nor insert work.
|
|
|
|
|
Try inserting the data inside the transaction and commit the transaction in .net code
modified on Wednesday, December 30, 2009 12:48 PM
|
|
|
|