|
Yes. But it shows up in the page title tag. Not in link title tag.
Muthu
|
|
|
|
|
I tried hour code. This is the result:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<head><title>
Hotmail
</title>
<script language="javascript" type="text/javascript"></script>
</head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTcwMTA2MDUyMQ9kFgICAQ8WAh4EVGV4dAUEYXNkZmRkun75GOWkWTwjDWDof9T4GIHhF04=" />
</div>
<div id ="div1" >
<a href="http://www.hotmail.com" style="background-color: #ff6600; color:Black" title ="Hotmail"></a>
</div>
</form>
</body>
<html>
As you see, the string is both in the page title and the link title.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi.
I have used a datagrid in my project.
Usually ( or always ) Columns of a datasource is next to eachother as it shown in datagrid.
for example datagrid shows like this :
Header1 Header2
databound databound
Now,my question is :
Can I have these columns under each other ?
like this :
Header 1 databound
Header 2 databound
how can I do that ?
|
|
|
|
|
You can use a DataList control and modify its ItemTemplate property to view what you want.
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
Thank you very much but I want to use datagrid not datalist ...its better I think.
any other ideas about direction of datagrid as I asked above?
|
|
|
|
|
Hello all,
I am working on a website which is using Forms Authentication.
For example we have different Roles as Admin and LocalUsers. LocalUser cannot view the Admin Menu Items and cannot access the Admin Pages.
But if the User Copies and Pastes the URL for Admin Page, while he is logged on as a LocalUser, he can see the Admin Page even though he do not have permissions to view that page.
I know that we can check the Roles in the PageLoad before giving access to the Page by User.ISINRole("Admin") and if does not have that role, I can Redirect him to the Login Page.
But is there any centralized way where we can do this. Or do we need to check the Roles in each and Every page.
Thanks In Advance
|
|
|
|
|
ASP.NET 1.1
When I'm working on ASP.NET 1.1 projects, I used to create a basepage class that can be inherited from all child classes.
So, we can check the permission of the user in basepage for all pages.
ASP.NET 2.0
Master Page can be used instead of BasePage Class.
|
|
|
|
|
I am developing a web community on the lines of orkut as part of my final yr pro....
My problem is ......
wenever i run my project thro the instant server provided by Visual WEB developer 2005 it wprks perfectly .. but as soon as i try to run in local IIS sever i get some problems saying WINDOWS/Forms authentication failed ... Any solution to the problem is welcome ....
|
|
|
|
|
Are you trying to run it in the IDE or directly through localhost?
Try going to the properties for that particular site in IIS and under the Security tab choose the first edit button. Under there make sure that "Windows Authentication" is checked.
Cleako
|
|
|
|
|
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
|
|
|
|