|
Hi all,
I am parsing a html page, i want to get values between these this
<td>anythinhere 5656 </td>, i want to pick only between these two tags, i m using this regular expression, <td[\w\W^<>]*?</td> but with this i m getting result with <td>sfsadafd</td>
plz help
many thanks,adnan
Many Thanks,
Adnan Rafiq
muhammadadnanrafiq@gmail.com
|
|
|
|
|
This seems to work:
<td[\w\W^<>](?<CaughtData>.+)</td>
The value will be stored in the CaughtData group.
|
|
|
|
|
Hi, Bundle of thanks it works grt.
Many thanks
Many Thanks,
Adnan Rafiq
muhammadadnanrafiq@gmail.com
|
|
|
|
|
im trying to access data from Oracle 9i from asp.net page. I am tring to read the ConnectionString property from my web.config file with the code below
Imports System.Data
Imports System.Data.OleDb
Imports System.Configuration
Partial Class AddLocations
Inherits System.Web.UI.Page
'Dim connString As String = ConfigurationManager.ConnectionStrings.ToString
Dim connString As String = ConfigurationManager.AppSettings.Item("ORAConnectionString").ToString
Dim oCnn As New OleDbConnection(connString)
Dim oCmd As OleDbCommand
on running the page i got this error
Object reference not set to an instance of an object.
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.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
see my web.config file below
webconfig
---------------
<configuration>
<appsettings>
<connectionstrings>
<add name="ORAConnectionString" connectionstring="Data Source=dcs;User ID=scott;Password=tiger;Unicode=True" providername="System.Data.OracleClient">
t.aransiola
|
|
|
|
|
you can use the following code to retrieve the application settings from the app.config.
System.Configuration.ConfigurationSettings.AppSettings("ORAConnectionString").tostring
The next problem in your code is you have to create an instance for a oledbcommand like
Dim oCmd As new OleDbCommand(Command text, connection)
try this
Sathesh Pandian
|
|
|
|
|
Hi,
How best to get application settings to initialize a property or member variable?
I have this in my constructor:
_MySetting = ConfigurationManager.AppSettings["MySetting"]);
This might fail if the user hasn't got the application setting defined. Constructor should only initialize members really so how best to write it in a constructor so that it initializes to a defined setting or another value if the setting is not defined?
|
|
|
|
|
If you happen to be using .net 2.0 you can use the ??
So your code would be:
_MySetting = ConfigurationManager.AppSettings["MySetting"]) ?? "DefaultValueHere";
If you are using .net 1.1 you would probably have to do something like:
if (ConfigurationManager.AppSettings["MySetting"] == null)
{
_MySetting = "DefaultValueHere";
}
else
{
_MySetting = ConfigurationManager.AppSettings["MySetting"]);
}
Hope that helps.
Ben
|
|
|
|
|
string mySetting = ConfigurationManager.AppSettings["MySetting"]);
if(mySetting != null)
{
_MySetting = mySetting;
}
else
{
_MySetting = "default value";
}
Theres one way.
|
|
|
|
|
How about this:
_MySetting = (ConfigurationManager.AppSettings["MySetting "] == null) ? "default value" : ConfigurationManager.AppSettings["MySetting"]);
Evil cannot be conquered in the world... It can only be resisted within oneself.
|
|
|
|
|
how to create a link in a grid view's each row to navigate to some other page.???
|
|
|
|
|
Convert the cell you want to use to a template field then you can edit the template and put a link control inside.
|
|
|
|
|
<asp:HyperLinkField DataTextField="LastNameFirstNameMI"
HeaderText="Employee" SortExpression="LastNameFirstNameMI" DataNavigateUrlFields="EncryptedUID"
DataNavigateUrlFormatString="~/YourPageHere.aspx?id={0}" /> Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Woops! Forgot there was one of them!
|
|
|
|
|
Hi,
Can anybody please tell me how can we display an excel file in asp.net web page, not in ms-excel. in webpage itself i need to display the excel file. Please let me know if anybody is having any idea. Thanks in advance
Thanks and Regards
Venkat
|
|
|
|
|
You can read the xls file from your code then, show those data in HTML or DataGrid/Repeater or etc... just like reading data from SQL.
|
|
|
|
|
hi,
this is the code to do that, Dont forget to score it if it satisfies your need.
FileStream fileStream = new FileStream("c:\\Admin.xls", FileMode.OpenOrCreate, FileAccess.Read);
long len;
len = fileStream.Length;
Byte[] fileAsByte = new Byte[len];
fileStream.Read(fileAsByte, 0, fileAsByte.Length);
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-excel";
Response.BinaryWrite(fileAsByte);
Response.End();
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Hi
Thanks for your reply. it works fine. can you give me the same for ppt files. because i tried in the same way as above. it is not working. please help me out. Thanks once again.
Thanks and Regards
Venkat
|
|
|
|
|
Hi
it is also working fine. i have given contenttype wrongly. thats why its not worked previously. now its working fine. and thanks for your help. pls be in touch with me in future also. if u dont mind can you give ur mail id (personal) so that it would be better for me. once again thanks alot.
Thanks and Regards
Venkat
|
|
|
|
|
You are most welcome.. sylvester_g_m@yahoo.com is my email id
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Hello,
I am using Visual Studio 2003 in order to develop a setup and deployment project for a web application. Everything works fine excepting one desktop application that I have included in the setup and that have to be executed during the setup. The problem is that the setup waits for process execution and it does not complete until I close that application. The idea of the application is to stay in the system tray and not to be closed. My question is: is there a parameter that I can specify in order that the setup to do not wait for desktop application execution.
I am very familiar INNO setup and there is a flag nowait that does this trick. If anyone can point me a similarity in Visual Studio, I would appreciate it.
Thanks,
Dan.
|
|
|
|
|
hi,
this s regarding publishing the web application (c#,Asp.net.)
Currently,a website is been developed on Html, Java Script,designer tools,etc..
i want the web application (c#,Asp.net.)to be integrated on it.
so that one link in current website can open this web application.
ANY SUGGESTION.
SIncerly
shriya
|
|
|
|
|
hi..
just give link address of your asp.net application page(eg http://serveraddress/applnname/pagename.aspx ) in the html link of the html page. The asp.net page will start running when the link is clicked.
similarly in asp.net page use an html link or any link control and provide the link address of html page and the html page loads successfully.
enjoy..
|
|
|
|
|
sry,for late response,
the actual problem is .. i m not through the complete process..
i dnt know the files statistics of web application(asp.net +c#).
i had a requirment of distance calculator(i developed on c# + asp.net)in my website.
now i am not able to integrate them.[general html pages with new developed distance calculator on asp.net](dnt know the process)
Do i need to go for publishing the web application?(c# + asp.net),
thnks, shriya
|
|
|
|
|
i think may be i dint understand what u mean clearly .
is that u want to integrate and page with asp control (here the distance calculator) with and html page?
if so, you can try to keep the distance calculator application page you developed in the new asp page.
and then use iframe tag to call that asp page in the html page. i think then the asp page with the control will load once the html page is tried to open and the ouput will be rendered in a single page
...its just my idea ...i am not clear what u want
enjoy..
|
|
|
|
|
hi..
Can know the ways to send secure data like user login info,passwords,credit card info,personal details securely to and from the server. I think we can use "SSL" is it right?Can you suggest any other methods i can achieve it?
enjoy..
|
|
|
|