|
hi code guys!
sorry for bad subject but this small problem really put me on the back.
I have a web browser control in my c# app. Now the following code gives me access to page contents.
////////////
HTMLDocument myDoc= new HTMLDocumentClass();
myDoc = (HTMLDocument) WB.Document;
String var= myDoc.body.InnerText;
//now var has the body contents
//////////
All works fine but this code never goes into the frames. I need to access particular frame’s contents. I have tried different things but never got anything right.
Firstly I need the code to determine how much frames the particular page has.
Then I want to get first frame’s contents.
Thanks
|
|
|
|
|
I need to insert text into a and I need to insert text at the current cursor location. Any sample script? Thanks in advance.
Norman Fung
|
|
|
|
|
I want to display a string (this string contains HTML page) in MS WebBrowser. (Not file or Web page!)
For example:
string s = "test";
and I have axWebBrowser1 in the Form.
What I must do??????????????
Help me, pleeeeeeeeeeease!
|
|
|
|
|
I would like to load a bitmap that is generated by a DLL on the fly something like this:
Response.BinaryWrite myObj.BitMapData
I can make my DLL save the bitmap to disk & then load it, so I know the bitmap is good. What format should the data coming back take?
Thanks,
Dave
|
|
|
|
|
Hi ,
Is there any way that I could verify a client certificate from within a web service ?
I need to validate the cert against a Client Revocation List from the CA.
I need to know how to get the CRL etc ... or is there sum way of automating
this functionality on 2003 ??
Thanks
|
|
|
|
|
hi
i made a local connection to accsess and i want to put the application on a server how can i deal with the connection ?
2nd-
i have pages made in asp and i want to make code that inserts record in db using asp not asp.net how it can be done ?
|
|
|
|
|
Hi everyone !
My code export data from a datagrid to file excel.
My code :
void Export(object sender, System.EventArgs e)
{
Response.Clear();
Response.Charset = "";
Response.Buffer = true;
this.EnableViewState = false;
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = System.Text.Encoding.Default;
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
DataGrid dg = new DataGrid();
dg.DataSource = data.Tables[__tableSelector.CurrentTabIndex];
dg.DataBind();
dg.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
}
when I want read excel file above, I can't read because format file save as "web page"!
- How to read excel file above?
- The excel file transmit to client and user will modify infomation in the file. I will update to my database depen on file upload form a client by read this file in server. Although in server I have a folder share and permission for everyone full control. But access to server was denyed!
- How to write file upload to server?
Thanks for your times !
Vinh
|
|
|
|
|
Have you considered using XML for generating and reading the excel file? You can generate an XML file and transform it using the XSL transformations for excel. I don't know if this will solve your problem, but having an XML version will enable the portability you are describing (also will get rid of the web page view). Also, if you use a dataset you can get to the XML representation of the data fairly quickly.
Here's an example of performing an XSLT transformation of XML data.
Private Sub FormatToExcel(ByVal xmlInfo As XmlDocument)
Dim myXMLDoc As XmlDocument = xmlInfo
Dim myXSLT As New Xsl.XslTransform
Dim myText As New IO.StringWriter
Dim myNav As XPath.XPathNavigator = myXMLDoc.CreateNavigator
Dim myWriter As New XmlTextWriter(myText)
myXSLT.Load(Server.MapPath("xslt/ExcelReport.xslt"))
myXSLT.Transform(myNav, Nothing, myWriter, Nothing)
Response.AddHeader("content-disposition", "attachment; filename=eventregistrants.xls")
Response.ContentType = "text/xml"
Response.Write("<?xml version=""1.0""?>" & myText.ToString)
End Sub
And here's the XSLT file:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<xsl:template match="*">
<ss:Workbook>
<ss:Worksheet ss:Name="Registration Data">
<ss:Table>
<ss:Row>
<ss:Cell ss:StyleID="ColumnHeader"><ss:Data ss:Type="String">First Name</ss:Data></ss:Cell>
<ss:Cell ss:StyleID="ColumnHeader"><ss:Data ss:Type="String">Last Name</ss:Data></ss:Cell>
<ss:Cell ss:StyleID="ColumnHeader"><ss:Data ss:Type="String">Email Address</ss:Data></ss:Cell>
ss:Type="String">Invoice ID</ss:Data></ss:Cell>
</ss:Row>
<xsl:for-each select="Registrants">
<ss:Row>
<ss:Cell ss:StyleID="ColumnData"><ss:Data ss:Type="String"><xsl:value-of select="FirstName"/></ss:Data></ss:Cell>
<ss:Cell ss:StyleID="ColumnData"><ss:Data ss:Type="String"><xsl:value-of select="LastName"/></ss:Data></ss:Cell>
<ss:Cell ss:StyleID="ColumnData"><ss:Data ss:Type="String"><xsl:value-of select="EmailAddress"/></ss:Data></ss:Cell>
<ss:Cell ss:StyleID="ColumnData"><ss:Data ss:Type="String"><xsl:value-of select="InvoiceID"/></ss:Data></ss:Cell>
</ss:Row>
</xsl:for-each>
</ss:Table>
</ss:Worksheet>
</ss:Workbook>
</xsl:template>
</xsl:stylesheet>
As for uploading files, you will need to incorporate a regular HTML File input control. Right click on the control and make sure the check "Run as server control". You then have access to methods and properties to save this file.
|
|
|
|
|
Hi everyone!
I use a datagrid.I want hide colums was maked by AutoGenerateColumns="true" but I don't know anyway.
When I use AutoGenerateColumns="false", AllowPaging="True" and OnPageIndexChanged="PageIndexChanged" my applacation can't call procedure "PageIndexChanged".
Thank for your times !
//My code
void PageIndexChanged(object sender, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
__theGrid.CurrentPageIndex = e.NewPageIndex;
BindData();
}
Vinh
|
|
|
|
|
maybe you should write your codes into Page_Load event, it's look like this:
private void Page_Load(object sender, System.EventArgs e)
{
BindData();
}
|
|
|
|
|
My application divide a datagrid into two parts.I use
method "dagagrid.Visible = false" in orde display infomation that I want.And I display many tables by tabstrip. It is difficult to display because Page_Load()
{
Bindata();
}
reload data in currentTab don't load data when tabstrip changed!
My codes write in html not that code behind.
thanks for reply!
Vinh
|
|
|
|
|
I have been asked to add search capabilities to an intranet using the indexing of iis. The documents are all searchable pdfs that have been scanned. Many of the documents have handwritten text that is not searchable by itself, so specific information has been encoded into the filename. I cannot, however, seem to figure out how to make a search form that allows users to search on the filename in addition to the text that has been indexed. Thank you in advance for your help!
|
|
|
|
|
How do I share an instance of a class between multiple calls to a Webservice?
I want to use my own connection pool to manage the connections to my database. I need to share that pool among the different calls to the webservice.
As I understand it, by default each call to a webmethod creates a new instance. I know you can turn on EnableSession - but I need somewhere I can put an instance where it can be used by any instance of a webmethod.
Help greatly appreciated!
Thanks,
Paul
/**********************************
Paul Evans, Dorset, UK.
**********************************/
|
|
|
|
|
Would it be just using the ASP.Net common object
Application["key"] ?
/**********************************
Paul Evans, Dorset, UK.
**********************************/
|
|
|
|
|
I have a JScript string that could potentially include text like this:
[url]whatever[/url]
I would like to replace it with:
<a href="whatever">whatever</a>
Any ideas how to do that? Thanks for any assistance!
|
|
|
|
|
Have you tried working with the JScript string object[^]?
If this is JScript.NET, you can just use the string class.
Is this client side? Server side?
Jon Sagara
"the good thing about hitting your head against a wall is when you stop"
-- l a u r e n's Web page
My Articles
|
|
|
|
|
No, it's standard JScript embedded in an ASP page (IIS5).. all server side.
Basically I have a discussion forum, which doesn't allow HTML, and I would like either:
(A) any links posted by the users to either appear automatically (e.g. some sort magic regular expression for "http:// + whatever + whitespace" replaces the text with a standard html link), -or-
(B) as an alternative, some sort of regular expression type search for "[url] + site.com + [/url]" and replace that with a standard html type link.
I found the following code on a site:
<a href="http://codelib.aspemporium.com/index.aspx?pid=110&cid=3">http://codelib.aspemporium.com/index.aspx?pid=110&cid=3</a>[<a href="http://codelib.aspemporium.com/index.aspx?pid=110&cid=3" target="_blank" title="New Window">^</a>]
Which looks to perform (A) above... however in converting the VBScript to server-side JScript I can't get the following line to work... this is my translation...
strOut = re.replace( strIn, "<A HREF=\"$1\">$1</A>" );
I assume the line about, the {1} is supposed to carry down into the $1 in this one in some fashion, but I don't quite understand how it works... and I can't seem to get it to work.
Any ideas? Simply finding a URL in any particular JScript String, and replacing it with an HREF is really all I need to do. Thanks for any help!
|
|
|
|
|
I'm no JScript expert, but I know David Wulff's[^] forums do what you're looking for, and, though written in C#, so to Mike Puddephat's[^].
I think David's are even written in JScript.
Jon Sagara
"the good thing about hitting your head against a wall is when you stop"
-- l a u r e n's Web page
My Articles
|
|
|
|
|
I'm actually running David's code on one of my servers, but (unless the beta is different than the release) I think it requires something like this to create a URL:
[url="http://www.forums.stardustsoftware.com"]The Stardust Software Web Site[/url]
The idea of a user being able to simply type http://www.site.com and have the display code parse and provide an HREF would be cool... but my JScript RegEx skills aren't quite good enough.
Regards, Larry
|
|
|
|
|
Ah, gotcha.
Larry Antram wrote:
but my JScript RegEx skills aren't quite good enough.
Ditto. I know that PHPBB does a good job of that, though. Don't know how well the RE will translate into JScript, though.
Sorry to keep pointing you around the web... just trying to promote "code reuse."
Jon Sagara
"the good thing about hitting your head against a wall is when you stop"
-- l a u r e n's Web page
My Articles
|
|
|
|
|
hello everyone, just wondering if anyone knows how to set a report with double columns, for example below
the numbers represent the lines
------------------------------------
1. field1 field 2 | 6. field1 field2
2. field1 field 2 | 7. field1 field2
3. field1 field 2 | 8. field1 field2
4. field1 field 2 | 9. field1 field2
5. field1 field 2 | .... field1 field2
it's like in MS word where you have two columns.
is there some settings that i have to do, or how can i achieve this, please help
i'm passing data into report by table in a dataset.
sitting here waiting for someone to reply.
*HyVong*
|
|
|
|
|
Hi people,
I have been using excel up to now for my work and now have chosen to expand to the net. I have one issue though with my work.....
I use a data loader that i coded through excel to oracle and i was thinking would it be possible to do create through asp a loader for this.
I.e log on to my site and select info and load from the site??
If anyone can help i can send them the excel loader and as a new member i have a gift for anyone that can help....a gmail account
cheers
steve
|
|
|
|
|
not sure if anyone still uses this, but I installed .NetFramework 1.0 sp1
(released, aug31,2004) and after that I was getting some javascript errors.
I have a user control inside a webform. basically have login.ascx inside login.aspx. the login.ascx contains the tag.
before the sp1 the form would render like this...
after sp1 it was this...
It is killing some of my javascript where I look for
"_ctl:Form1"!
any help would be greatly appreciated.
Ganesan Muthiah
email:ganerathu@hotmail.com
|
|
|
|
|
Hy !
I will like to be able to make a synchronization between two Web pages asp 3. I modify fields in a page and in the second the change is carried out dynamically...
Thank you for your assistance!
|
|
|
|
|
The second page should not be reloader because a activex is present and does not have to be reloader
|
|
|
|