public override System.Web.Hosting.VirtualFile GetFile(string virtualPath)
{
if (virtualPath.EndsWith("YourVirtualPath.aspx"))
{
if (HttpContext.Current.Items["Value"] != null)
HttpContext.Current.Response.Redirect(HttpContext.Current.Items["Value"].ToString());
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
Just Add to add all controls of myPage in current Page
for (int i = 0; i < myPage.Controls.Count;i++ )
Page.Controls.Add(myPage.Controls[i]);
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
Edwin_Pro_Ne...
Member
12 Points
60 Posts
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 02:23 AM|LINK
can u show some detail ? coz it's seen like not really easily for me...
do i need to keep repeat for the set parameter statement above ?
more example will help me understand the passing arguement.....
thankz
Edwin_Pro_Ne...
Member
12 Points
60 Posts
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 03:58 AM|LINK
appreciated if got some sample to me.......
just a simple demo for me if possible.........
Edwin_Pro_Ne...
Member
12 Points
60 Posts
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 05:56 AM|LINK
problem show below
i have eight link_id which retrieve from database, loop each at a time...
therefore, the output only showed the last link_id's result perhaps not all ?
Refer the sample program segment and output below..........
Output like this :
imran_ku07
All-Star
45864 Points
7713 Posts
MVP
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 06:11 AM|LINK
I hope this will be your last question,
protected void Page_Init(object sender, EventArgs e) { if (!IsPostBack) { HttpContext.Current.Items["Value"] = DateTime.Now.Millisecond.ToString()+".html";public override System.Web.Hosting.VirtualFile GetFile(string virtualPath) { if (virtualPath.EndsWith("YourVirtualPath.aspx")) { if (HttpContext.Current.Items["Value"] != null) HttpContext.Current.Response.Redirect(HttpContext.Current.Items["Value"].ToString());Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD
Edwin_Pro_Ne...
Member
12 Points
60 Posts
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 06:37 AM|LINK
One last question, what should i do inside the URL param, coz it's already exist error there, last question for me
thanz
imran_ku07
All-Star
45864 Points
7713 Posts
MVP
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 06:38 AM|LINK
Your Logic seems to be correct,
Just Add to add all controls of myPage in current Page
for (int i = 0; i < myPage.Controls.Count;i++ )
Page.Controls.Add(myPage.Controls[i]);
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD
Edwin_Pro_Ne...
Member
12 Points
60 Posts
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 07:12 AM|LINK
Problem still haven't solve.... please.................
default.aspx
APP_code.cs
Edwin_Pro_Ne...
Member
12 Points
60 Posts
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 07:13 AM|LINK
only this problem, the rest isn;t a problem
Edwin_Pro_Ne...
Member
12 Points
60 Posts
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 07:21 AM|LINK
I uploaded my files to http://www.esnips.com/web/ingedwinsStuff , can you help me modified if u feel ok ?
imran_ku07
All-Star
45864 Points
7713 Posts
MVP
Re: Get viewsource data from HTML and yet set regular expression to ignore <TD></TD>
Nov 05, 2009 09:13 AM|LINK
try this
for (int k = 0; k < dt.Rows.Count; k++)
{
HttpContext.Current.Items["param"] = dt.Rows[k]["link_id"].ToString();
//Label3.Text = Label3.Text + "______" + dt.Rows[k]["link_id"].ToString();
Page myPage = (Page)BuildManager.CreateInstanceFromVirtualPath("~/YourVirtualPath.aspx", typeof(Page));
myPage.EnableViewStateMac = false;
myPage.ProcessRequest(HttpContext.Current);
Response.ClearContent();
Response.ContentType = "text/html";
for (int i = 0; i < myPage.Controls.Count; i++)
{
Page.Controls.Add(myPage.Controls[i]);
HtmlTable tb = ((HtmlTable)myPage.FindControl("jjj1"));
if (tb != null)
{
/*Response.Write("<table border='1'>");
for (int k = 0; k < tb.Rows.Count; k++)
{
Response.Write("<tr>");
for (int t = 0; t < tb.Rows[k].Cells.Count; t++)
{
Response.Write("<td>");
Response.Write(tb.Rows[k].Cells[t].InnerHtml);
Response.Write(tb.Rows[3].Cells[8].InnerHtml);
Label1.Text = (tb.Rows[3].Cells[8].InnerHtml);
Response.Write("</td>");
}
Response.Write("</tr>");
}
Response.Write("</table>");*/
Label1.Text = Label1.Text + " " + (tb.Rows[3].Cells[8].InnerHtml);
TextBox1.Text = TextBox1.Text + " " + (tb.Rows[3].Cells[8].InnerHtml);
}
}
}
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD