|
Could anyone help me on how i can write an ASp.Net to access data from a web page(someone else web page). I want to access the page and read the data into my own asp.net page.
The web page data is expected in Table format.
Preferably,if there can be a conversion of the webpage data to another format for my page to use.
thank u in advance
t.aransiola
|
|
|
|
|
You can use a WebRequest or a WebClient object to request the page.
---
Year happy = new Year(2007);
|
|
|
|
|
Hi.
I'm a new member here.
My English is not very well, but I hope it´s good enough to make you understand me.
Well...
I'm with a litlle problems here.
I registered a "Click" event
handler for the dynamicly added control. However, when I
click the control , its event handler isn't called. But If I add and register the event handler operation in the Page_load, it works well.
Here is the code:
protected void CreateTable()
{
HtmlTable tablegen = new HtmlTable();
HtmlTableRow rowgen = new HtmlTableRow();
for (int i = 0; i <= 2; i++)
{
HtmlTableCell cellgen = new HtmlTableCell();
if (i == 0)
{
cellgen.Width = "50px";
cellgen.Align = "center";
cellgen.InnerText = "......"
}
else if(i == 1)
{
cellgen.Width = "50px";
cellgen.Align = "center";
cellgen.InnerText = ".....";
}
else if(i == 2)
{
cellgen.Width = "50px";
cellgen.Align = "center";
ImageButton imgButton = new ImageButton();
imgButton.ImageUrl = "Test.gif";
imgButton.ToolTip = "Test";
imgButton.Click +=
new ImageClickEventHandler(imgButton_Click);
cellgen.Controls.Add(imgButton);
}
rowgen.Cells.Add(cellgen);
}
tablegen.Rows.Add(rowgen);
I call this method from a click event of a button.
I need to create controls, in this case ImageButtons, that are
dynamically loaded, and they must be allocated in the third cell of a table in every row. The curios is that they don't call the event handler when created out of the Page_Load.
Somebody can help me ?
Maximilian Thanks
|
|
|
|
|
If you add controls dynamically, they need to be recreated before the Page_Load event ( usually in LoadViewState ), or the viewstate won't be restored for the control in time for the event to have a control to attach itself to, so it will be lost.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Set the event in the page_init
<br />
protected void Page_Init(object sender, EventArgs e)<br />
{<br />
CreateTable();<br />
}<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
this.Init += new EventHandler(Page_Init);<br />
}<br />
|
|
|
|
|
I have a Gridview connected to a Access table. One of the columns in the Gridview displays address, city, and state. How can I display this information on three separate lines within the cell for each row?
Our end goal here is to create a reality listing page that displays a small picture of each house along with multi line descriptions. I'm trying to use a Gridview for this. Is this the best way?
I want the page to look like this:
+ + + + + 123 Smith Ave
+ + + + + Maumee, OH
+ + + + + Price: 200,000
+ + + + +
+ + + + + 5422 Conant
+ + + + + Maumee, OH
+ + + + + Price: 168,000
+ + + + +
|
|
|
|
|
Insert <br/> tags to create line breaks
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
|
|
Thanks for the info and asp link. Great article!
|
|
|
|
|
Please tell me is their anyway ? I can use the textbox value as a HyperLink value on Report or ReportViewer.
Sarfaraj AHMED
|
|
|
|
|
Yeah I have done that.
Off the top of my head do a for loop for each gridview row in the grid view. Then use row.findcontrol() to get your check box and other values to update the database.
BTW, I got burned doing this because we had a group of users using the same application and some people would keep it open all day and save at the end of the day effectively overwriting what others had done. Be sure to add record locking of some sort if you are going to users update a group of records at once.
|
|
|
|
|
I work on VS 2005
How do i use the HtmlWriter class to add html tags to my web page using csharp code?
I have only a vague idea about this class.
Can you give me an example and show how i can do that?
Thanks in advance.
Regards
|
|
|
|
|
Response.Write("<tags>"Quality Software since 1983!" http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and articles.
|
|
|
|
|
Thanks Jasmine..
I wanted to know how to make use of the HtmlTextWriter class for doing it.
(sorry it wasn't HtmlWriter!)
There are other classes also that are used like the HtmlTextWriterAttribute , HtmlTextWriterTag and HtmlTextWriterStyle classes.
Can you help me use these classes?
Thankyou.
Regards
|
|
|
|
|
Well, I don't see why you want to do things the hard way, but I suppose you must have a reason. There's good sample code for HtmlTextWriter in the MSDN documentation. Took me two clicks to find it.
Why are you using this?
|
|
|
|
|
I happen to know about the MSDN sample.
Just wanted to more about those classes, in case anybody has used it, can help me.
No question of going the harder way or anything.
Regards
|
|
|
|
|
Hi All,
I have a problem with autocomplete in ASP.net v2
the autocomplete dailog displayed in the buttom of the page and not directly below the textbox
|
|
|
|
|
I am in the process of learning ASP .net or ASP. I need to build a
schedule on this schedule I need to be able to block out certain times
for holiday/lunch, make it so that people run off the Active Directory
when they go to it, and make it so that it does a log of who adds and
schedules patients, able to add patient name and phone along with why
they are there for. Any suggestions please let me know. Thanks! This is for internal purposes only not for the web. Internal web server. please help. Thanks!
ps. slot for each Doctor.
|
|
|
|
|
Steverpayne wrote: ASP .net or ASP
Early stages then ?
Steverpayne wrote: I need to build a
schedule
It worries me to think that you're learning 'asp.net or asp' to write something that will be used, shouldn't you learn it first ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
well i have a very demanding boss. i had someone working on it and they havent done anything else. Do you have a better suggestion? it is the early stages and planning. I pretty much have the idea, but need help. And the only way i am going to learn, is by doing. Is that a problem? Doesnt mean that I am going to build it tomorrow and start using it.
|
|
|
|
|
Steverpayne wrote: well i have a very demanding boss
He's an idiot. He should pay you to learn, or hire someone who knows how to do the job at hand.
Steverpayne wrote: And the only way i am going to learn, is by doing. Is that a problem?
Not at all. But, it's unlikely that the first thing you write will be production quality, is my point.
Forget ASP, go with ASP.NET. It's easier, better, and more widely supported. It's also very likely you'll be able to find pre built components for ASP.NET that give you a lot of the UI you are looking for.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello Everybody,
Im learning web application with vb 2005 and I got some question, really I need your help
DS = DataSet
DR = DataReader
1. dsReport.Tables(0).Load(drReport)
My question is why is table(0) ? and If I create more than one one table then how do the dsReport will find the table?
2. Is their anyway I can pass a HyperLink from the report?
Let me tell what Im doing................
I got the top 10 Customer basic information in the report, When I will click CustomerID or CustomerName then another page will be load where I can see the whole details also I would like to put a Button (CustomerActivity) when I will click the button then I would like to see about his transaction like how many times, how much................... what he has done so far.
Top 10 Customer --> One Customer whole details --> One Customer Activity
Also could you please tell me if I would like to pull data from web server then do I need to change..... the following
ReportViewer.LocalReport.ReportPath= Server.MapPath(" Name.rdlc")
or
Just change the DataAccess path ( Localhost to Server ............)
On the other hand, I viewed data in a GridView where I created some property for the table and connect the class file with the gridview.
Can I connect the Class (All Property (Like a Table)) with Report?
Im using VS 2005 Report and ReportViewer, I dont want to use Crystal Report.
Please help me......
Waiting For Your Reply
Thanks
Sarfaraj
Sarfaraj AHMED
|
|
|
|
|
wrote: My question is why is table(0) ?
Because it's the first one ?
wrote: and If I create more than one one table then how do the dsReport will find the table?
Index the table you want, if they are in the same dataset.
What is ReportViewer ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hey all,
This may be a stupid question but is it possible to write to an existing MSword document before you open it?
I am currently trying to automate word to open via the webserver and ASP.NET but because of the security risks involved and the stability of that route, Im hoping I can write to word before opening it.
Then being able to use a link to open the file readonly with the changes made.
Is this possible?
I hope someone can help me.
Thank you for your time,
Dave
|
|
|
|