|
Did you try this?
<a href="http://test.com/MyPage/Select.aspx">Select</a>
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
yes I have tried the same. In the mail body after receiving, the word Select is shown as text. But not link.
|
|
|
|
|
Did you already take a look at the actual source of the mail? Maybe it's just a display issue (or configuration option) with your email application.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
You create a HTML Page, place whatever you want as content in it, and attach the page to the
MailMessage.Body property
Dim netMail As New MailMessage
netMail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
netMail.IsBodyHtml = True
netMail.BodyEncoding = System.Text.Encoding.UTF8
netMail.Priority = MailPriority.High
netMail.Subject = m_Subject & " - " & DateTime.Now.ToLongTimeString()
netMail.SubjectEncoding = System.Text.Encoding.UTF8
netMail.Body = htmlTemplate
When creating your HTML, us the rules, you use tables and cells, old school HTML
https://www.campaignmonitor.com/resources/will-it-work/guidelines/[^]
|
|
|
|
|
|
It's likely the client's email program. Many disable html by default for security reasons. Just have them enable html emails.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi all ,
I am using save, cancel and back button to update the content page ,please see code below but they are not able to do so,Please tell to make them to update the page.
MASTER page:-
<%@ Master Language="C#" MasterPageFile="~/Layout.master" AutoEventWireup="true" CodeFile="Userwebpages.master.cs" Inherits="Userwebpages" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<asp:ContentPlaceHolder id="ContentPlaceHolderinNestedhead" runat="server">
</asp:ContentPlaceHolder>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table id="webpagetable">
<tr>
<td class="backbutton">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePnl1" runat="server">
<ContentTemplate>
<asp:Button ID="Back_button" runat="server" CssClass="button" CausesValidation="false" Text="Back" OnClick="Back_click" />
<hr class="horizontal-ruler"/>
</ContentTemplate>
</asp:Updatepanel>
</td></tr>
<tr><td>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePnl1" >
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/loading_circle.gif" CssClass="loading_image">
</asp:Image>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:ContentPlaceHolder id="ContentPlaceHolderInNested" runat="server">
</asp:ContentPlaceHolder>
Content Page .ASPX-
<pre><%@ Page Title="" Language="C#" MasterPageFile="~/Userwebpages.master" AutoEventWireup="true" CodeFile="User.aspx.cs" Inherits="Super_admin_User" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderinNestedhead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderinNested" Runat="Server">
<h3 class="page-heading">User</h3>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always"
ChildrenAsTriggers="true" >
<ContentTemplate>
<table id="Usertable" cellspacing="20" align="center">
<%----%>
<tr><td class="txtfieldname">Branch :</td><td>
<asp:DropDownList ID="ddlbranchname"
CssClass="dropdownlist" runat="server"
DataTextField="Branch_name" DataValueField="Branch_Id" AutoPostBack="True"
onselectedindexchanged="ddlbranchname_SelectedIndexChanged">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="Rfv_branchname" runat="server" Display="None" ErrorMessage="Please select Branch name " SetFocusOnError="true" ControlToValidate="ddlbranchname"></asp:RequiredFieldValidator>
</td>
<td class="txtfieldname">
User Type :</td>
<td>
<asp:DropDownList ID="ddlusertypesearching"
CssClass="dropdownlist" runat="server"
DataTextField="User_Typename" DataValueField="User_Type_Id"
onselectedindexchanged="ddlusertypesearch_SelectedIndexChanged"
AutoPostBack="True"></asp:DropDownList>
<asp:RequiredFieldValidator ID="Rfv_usertype" runat="server" Display="None" ErrorMessage="Please select user type " SetFocusOnError="true" ControlToValidate="ddlusertypesearching"></asp:RequiredFieldValidator>
</td>
</tr>
<%----%>
<tr><td colspan="4" align="left"> <asp:Button ID="Btn_AddnewUser" runat="server"
CssClass="button" Text="Add New user" onclick="Btn_AddnewUser_Click" />
<asp:HiddenField ID="Input_mode" runat="server" Value="I" />
<asp:HiddenField ID="User_Id" runat="server" />
</td></tr>
<tr><td colspan="4" style="height:400px; vertical-align:top; align:center;" >
<asp:GridView ID="GridView_BranchUsers" CssClass="GridViewStyle"
runat="server" AutoGenerateColumns="False"
onrowcommand="Gridview_branchusers_rowcommand"
onrowdatabound="Gridview_branchusers_databound">
<Columns>
<asp:TemplateField HeaderText="Sno" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lbl_sno" runat="server" Text="<%# Container.DataItemIndex+1 %>"></asp:Label>.
<asp:HiddenField ID="User_Id" runat="server" Value="<%# Bind('User_Id') %>" />
<asp:HiddenField ID="Usertypeid" runat="server" Value="<%# Bind('User_Type_Id') %>" />
<asp:HiddenField ID="Gender" runat="server" Value="<%# Bind('Gender') %>" />
<asp:HiddenField ID="Designation" runat="server" Value="<%# Bind('Designation') %>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Branch Name" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lbl_branchname" runat="server" Text="<% #Bind('Branch_name') %>"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Firstname" HeaderText="First Name "
SortExpression="Firstname" />
<asp:BoundField DataField="Lastname" HeaderText="Last Name"
SortExpression="Lastname" />
<asp:BoundField DataField="Username" HeaderText="Username"
SortExpression="Username" />
<asp:BoundField DataField="Password" HeaderText="Password"
SortExpression="Password" />
<asp:TemplateField HeaderText="Active Status" ItemStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:Label ID="User_Active" runat="server" Text="<% #Bind('Active') %>"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit1" CommandArgument="<%# Container.DataItemIndex %>">Edit</asp:LinkButton></ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="GridViewHeaderStyle" />
<RowStyle CssClass="GridViewRowStyle" />
</asp:GridView>
<asp:Panel ID="Pnl_edituser" runat="server">
<table cellspacing="20" align="center" style=" vertical-align:top; text-align:center;">
<tr>
<td class="txtfieldname">
First Name :</td>
<td align="left">
<asp:TextBox ID="txtfirstname" runat="server" CssClass="txtbox"></asp:TextBox>
<ajaxtoolkit:FilteredTextBoxExtender
ID="FilteredTextBoxExtender1" runat="server" FilterType="LowercaseLetters, UppercaseLetters"
TargetControlID="txtfirstname">
</ajaxtoolkit:FilteredTextBoxExtender>
</td>
</tr>
<tr><td class="txtfieldname">Last Name :</td><td align="left">
<asp:TextBox ID="txtlastname" runat="server" CssClass="txtbox"></asp:TextBox>
<ajaxtoolkit:FilteredTextBoxExtender
ID="FilteredTextBoxExtender2" runat="server" FilterType="LowercaseLetters, UppercaseLetters"
TargetControlID="txtlastname">
</ajaxtoolkit:FilteredTextBoxExtender>
</td></tr>
<tr>
<td class="txtfieldname">
Gender</td>
<td align="left">
<asp:RadioButton ID="Rdo_male" runat="server" Checked="True"
GroupName="gender" Text="Male" />
<asp:RadioButton ID="Rdo_female" runat="server" GroupName="gender"
Text="Female" />
</td>
</tr>
<tr>
<td class="txtfieldname">
Designation</td>
<td align="left">
<asp:TextBox ID="txtdesignation" runat="server" CssClass="txtbox"></asp:TextBox>
<ajaxtoolkit:FilteredTextBoxExtender
ID="FilteredTextBoxExtender3" runat="server" FilterType="LowercaseLetters, UppercaseLetters"
TargetControlID="txtdesignation" ValidChars="_">
</ajaxtoolkit:FilteredTextBoxExtender>
</td>
</tr>
<tr>
<td class="txtfieldname">
Username :</td>
<td align="left">
<asp:TextBox ID="txtusername" runat="server" CssClass="txtbox"></asp:TextBox>
<ajaxtoolkit:FilteredTextBoxExtender
ID="FilteredTextBoxExtender4" runat="server" FilterType="LowercaseLetters, UppercaseLetters"
TargetControlID="txtusername">
</ajaxtoolkit:FilteredTextBoxExtender>
</td>
</tr>
<tr>
<td class="txtfieldname">
Password :
</td>
<td align="left">
<asp:TextBox ID="txtpwd" runat="server" CssClass="txtbox"></asp:TextBox>
</td>
</tr>
<tr>
<td class="txtfieldname">
Confirm Password :
</td>
<td align="left">
<asp:TextBox ID="txtcpwd" runat="server" CssClass="txtbox"></asp:TextBox>
</td>
</tr>
<tr>
<td class="txtfieldname">
User Account Status :</td>
<td align="left">
<asp:CheckBox ID="Chk_accountstatus" runat="server" />
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="Btn_save" runat="server" CssClass="button" Text="Save"
onclick="Btn_save_Click" />
<asp:Button ID="Btn_cancel" runat="server" CssClass="button" Text="Cancel"
onclick="Btn_cancel_Click" CausesValidation="False"
/>
<asp:Button ID="Btn_back" runat="server" CssClass="button" Text="Back"
onclick="Btn_back_Click" CausesValidation="False" />
</td>
</tr>
</table>
</asp:Panel>
</td></tr>
</table>
<%----%>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
</td></tr>
</table>
</asp:Content></pre>
Master Page C#:-
<%@ Page Title="" Language="C#" MasterPageFile="~/Userwebpages.master" AutoEventWireup="true" CodeFile="User.aspx.cs" Inherits="Super_admin_User" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderinNestedhead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderinNested" Runat="Server">
<h3 class="page-heading">User</h3>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always"
ChildrenAsTriggers="true" >
<ContentTemplate>
<table id="Usertable" cellspacing="20" align="center">
<%----%>
<tr><td class="txtfieldname">Branch :</td><td>
<asp:DropDownList ID="ddlbranchname"
CssClass="dropdownlist" runat="server"
DataTextField="Branch_name" DataValueField="Branch_Id" AutoPostBack="True"
onselectedindexchanged="ddlbranchname_SelectedIndexChanged">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="Rfv_branchname" runat="server" Display="None" ErrorMessage="Please select Branch name " SetFocusOnError="true" ControlToValidate="ddlbranchname"></asp:RequiredFieldValidator>
</td>
<td class="txtfieldname">
User Type :</td>
<td>
<asp:DropDownList ID="ddlusertypesearching"
CssClass="dropdownlist" runat="server"
DataTextField="User_Typename" DataValueField="User_Type_Id"
onselectedindexchanged="ddlusertypesearch_SelectedIndexChanged"
AutoPostBack="True"></asp:DropDownList>
<asp:RequiredFieldValidator ID="Rfv_usertype" runat="server" Display="None" ErrorMessage="Please select user type " SetFocusOnError="true" ControlToValidate="ddlusertypesearching"></asp:RequiredFieldValidator>
</td>
</tr>
<%----%>
<tr><td colspan="4" align="left"> <asp:Button ID="Btn_AddnewUser" runat="server"
CssClass="button" Text="Add New user" onclick="Btn_AddnewUser_Click" />
<asp:HiddenField ID="Input_mode" runat="server" Value="I" />
<asp:HiddenField ID="User_Id" runat="server" />
</td></tr>
<tr><td colspan="4" style="height:400px; vertical-align:top; align:center;" >
<asp:GridView ID="GridView_BranchUsers" CssClass="GridViewStyle"
runat="server" AutoGenerateColumns="False"
onrowcommand="Gridview_branchusers_rowcommand"
onrowdatabound="Gridview_branchusers_databound">
<Columns>
<asp:TemplateField HeaderText="Sno" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lbl_sno" runat="server" Text="<%# Container.DataItemIndex+1 %>"></asp:Label>.
<asp:HiddenField ID="User_Id" runat="server" Value="<%# Bind('User_Id') %>" />
<asp:HiddenField ID="Usertypeid" runat="server" Value="<%# Bind('User_Type_Id') %>" />
<asp:HiddenField ID="Gender" runat="server" Value="<%# Bind('Gender') %>" />
<asp:HiddenField ID="Designation" runat="server" Value="<%# Bind('Designation') %>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Branch Name" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lbl_branchname" runat="server" Text="<% #Bind('Branch_name') %>"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Firstname" HeaderText="First Name "
SortExpression="Firstname" />
<asp:BoundField DataField="Lastname" HeaderText="Last Name"
SortExpression="Lastname" />
<asp:BoundField DataField="Username" HeaderText="Username"
SortExpression="Username" />
<asp:BoundField DataField="Password" HeaderText="Password"
SortExpression="Password" />
<asp:TemplateField HeaderText="Active Status" ItemStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:Label ID="User_Active" runat="server" Text="<% #Bind('Active') %>"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit1" CommandArgument="<%# Container.DataItemIndex %>">Edit</asp:LinkButton></ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="GridViewHeaderStyle" />
<RowStyle CssClass="GridViewRowStyle" />
</asp:GridView>
<asp:Panel ID="Pnl_edituser" runat="server">
<table cellspacing="20" align="center" style=" vertical-align:top; text-align:center;">
<tr>
<td class="txtfieldname">
First Name :</td>
<td align="left">
<asp:TextBox ID="txtfirstname" runat="server" CssClass="txtbox"></asp:TextBox>
<ajaxtoolkit:FilteredTextBoxExtender
ID="FilteredTextBoxExtender1" runat="server" FilterType="LowercaseLetters, UppercaseLetters"
TargetControlID="txtfirstname">
</ajaxtoolkit:FilteredTextBoxExtender>
</td>
</tr>
<tr><td class="txtfieldname">Last Name :</td><td align="left">
<asp:TextBox ID="txtlastname" runat="server" CssClass="txtbox"></asp:TextBox>
<ajaxtoolkit:FilteredTextBoxExtender
ID="FilteredTextBoxExtender2" runat="server" FilterType="LowercaseLetters, UppercaseLetters"
TargetControlID="txtlastname">
</ajaxtoolkit:FilteredTextBoxExtender>
</td></tr>
<tr>
<td class="txtfieldname">
Gender</td>
<td align="left">
<asp:RadioButton ID="Rdo_male" runat="server" Checked="True"
GroupName="gender" Text="Male" />
<asp:RadioButton ID="Rdo_female" runat="server" GroupName="gender"
Text="Female" />
</td>
</tr>
<tr>
<td class="txtfieldname">
Designation</td>
<td align="left">
<asp:TextBox ID="txtdesignation" runat="server" CssClass="txtbox"></asp:TextBox>
<ajaxtoolkit:FilteredTextBoxExtender
ID="FilteredTextBoxExtender3" runat="server" FilterType="LowercaseLetters, UppercaseLetters"
TargetControlID="txtdesignation" ValidChars="_">
</ajaxtoolkit:FilteredTextBoxExtender>
</td>
</tr>
<tr>
<td class="txtfieldname">
Username :</td>
<td align="left">
<asp:TextBox ID="txtusername" runat="server" CssClass="txtbox"></asp:TextBox>
<ajaxtoolkit:FilteredTextBoxExtender
ID="FilteredTextBoxExtender4" runat="server" FilterType="LowercaseLetters, UppercaseLetters"
TargetControlID="txtusername">
</ajaxtoolkit:FilteredTextBoxExtender>
</td>
</tr>
<tr>
<td class="txtfieldname">
Password :
</td>
<td align="left">
<asp:TextBox ID="txtpwd" runat="server" CssClass="txtbox"></asp:TextBox>
</td>
</tr>
<tr>
<td class="txtfieldname">
Confirm Password :
</td>
<td align="left">
<asp:TextBox ID="txtcpwd" runat="server" CssClass="txtbox"></asp:TextBox>
</td>
</tr>
<tr>
<td class="txtfieldname">
User Account Status :</td>
<td align="left">
<asp:CheckBox ID="Chk_accountstatus" runat="server" />
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="Btn_save" runat="server" CssClass="button" Text="Save"
onclick="Btn_save_Click" />
<asp:Button ID="Btn_cancel" runat="server" CssClass="button" Text="Cancel"
onclick="Btn_cancel_Click" CausesValidation="False"
/>
<asp:Button ID="Btn_back" runat="server" CssClass="button" Text="Back"
onclick="Btn_back_Click" CausesValidation="False" />
</td>
</tr>
</table>
</asp:Panel>
</td></tr>
</table>
<%----%>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
|
|
|
|
|
How does the page now a button is clicked on the masterpage? The code behind of the buttons: where is that set?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Hi,
There is a online website of mine I would like to restrict users so that they will not able to save it offline using offline website copier software like HTTrack Website Copier and other similar software. Please help me.
|
|
|
|
|
If you manage to stop HTtrack then what about other apps that do the same thing you haven't heard of yet? Or a tool I wrote myself? Or just viewing the source and saving it? Or using my Browser's "Save As" function? Or not doing anything special, just taking the files from the cache folder? If there is no standardised way of doing something there is no way of stopping it.
If you don't want people copying your page, don't put it on the internet.
|
|
|
|
|
Not worth the effort. Move along.
There's a website I frequent that disables the right-click context menu, it pops up a dialog saying "don't do that", with (I expect) the purpose of keeping users (like me) from saving images from the site. But I can (and do) use Print Screen or any of the screen grabbers available to do that. Why do they bother? It's a mystery.
|
|
|
|
|
PIEBALDconsult wrote: Print Screen or any of the screen grabbers
The "Page Info" window in Firefox would let you save the original image. You don't even need to right-click to launch it - just press Alt to show the menu bar, then "Tools -> Page Info".
You could also use the developer tools to find the image URL, and save it from there.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: Firefox
But I can't think in Russian.
A screen grabber has the added benefit of allowing cropping and saving as a different (better) format.
|
|
|
|
|
|
Sorry.
|
|
|
|
|
You need to get over people stealing your brilliant content and code.
Took me years to get over people and machines steeling my pictures.
|
|
|
|
|
HI,
How to set Fieldset alignment in centre???
|
|
|
|
|
Are you looking something like this -
<fieldset style="border: solid 1px black; text-align: center;">
<legend>legent title</legend>
// something here ....
</fieldset>
modified 20-Sep-20 21:01pm.
|
|
|
|
|
HI,
What is the use of HiddenField???
|
|
|
|
|
|
HiddenField are basically used to store the small information or page specific information.
|
|
|
|
|
It is one of the way to hold client side values since they will not be displayed but accessible in server and client side.
|
|
|
|
|
hi every body
I have a HTML structure, something like
<body>
<div id="upperWrapper">
<%----%>
</div>
<div id="main Container">
<%----%>
</div>
</body>
Now I want the "upperWapper" height be the same size as my device ViewPort height. I know the JQuery can do this for me ;) but I wonder if there is a pure CSS solution or some better one! any help would be appreciated
|
|
|
|
|
found the solution by myself, I should set the div height to:
height:100vh;
vh means "viewport Heigh".
may be useful to some one else
|
|
|
|
|
Hi,
I am new in MVC and Entity framework, so I have some problem in my first project. So sorry if my question is to noob
What I have at this point:
I have table users(ID, Name, Password, TypeID, StatusID) and I have lookup table for this fields TypeID, StatusID UserTypes and UserStatuses.
Here is some code for more clarity
CREATE TABLE [dbo].[Users](
[ID] [int] NOT NULL,
[Name] [varchar](512) NOT NULL,
[Password] [varchar](128) NOT NULL,
[TypeID] [int] NULL,
[StatusID] [int] NULL
)
CREATE TABLE [dbo].[UserStatuses](
[ID] [int] NOT NULL,
[Description] [nvarchar](128) NULL
)
CREATE TABLE [dbo].[UserTypes](
[ID] [int] NOT NULL,
[Description] [nvarchar](128) NULL
)
In UserStatuses Table I store "active", "Blocked"
and in UserTypes "Admin", "User", "guest"
Values in UserTypes mey change in future so, I don't wont to convert Users.TypeID field in Enum.(this is important for me !)
What I need
How display user friendly values "active", "Blocked" for StatusID and "Admin", "User", "guest" for TypeID field, instead of number editor when I am generating view ?
link to some good article is welcome
|
|
|
|