|
devenv.exe wrote: inherits="MyWindowsService.Code.ProfileCommon"
According to the documentation[^], the inherits attribute is a "fully qualified type reference". That means you need to specify the assembly name as well.
devenv.exe wrote: All i want is given a userName, i should get that user's Profile LastName or FirstName from LDAP.
I don't see how the SqlProfileProvider is going to load anything from LDAP - it loads and stores the profile properties in SQL. You might have better luck using the System.DirectoryServices.AccountManagement assembly[^] to read this information.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hai All,
As a part of my project I need to plot multiple series of data and need to show the color of each series in the Legend. But when I have added legend , it is diminishing the plotted area. and the plotted area views wiered. Could anyone give me a solution for this.
<pre lang="c#">
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
string sqlquery = "select " + dd_axisX.SelectedValue.ToString() + ", " + dd_axisY.SelectedValue.ToString() + " from retrospect where locid=" + ds.Tables[0].Rows[i]["locid"].ToString();
System.Data.DataSet ds_ValuesToPlot = new System.Data.DataSet();
da = new MySqlDataAdapter(sqlquery, con);
da.Fill(ds_ValuesToPlot, ds.Tables[0].Rows[i]["locname"].ToString());
double[] Xdata = ds_ValuesToPlot.Tables[0].AsEnumerable().Select(e1 => Convert.ToDouble(nullconvert(e1[dd_axisX.SelectedValue.ToString()]))).ToArray();
double[] Ydata = ds_ValuesToPlot.Tables[0].AsEnumerable().Select(e1 => Convert.ToDouble(nullconvert(e1[dd_axisY.SelectedValue.ToString()]))).ToArray();
chrt_ScatterPlot.Series.Add(ds.Tables[0].Rows[i]["locname"].ToString());
chrt_ScatterPlot.Series[ds.Tables[0].Rows[i]["locname"].ToString()].ChartArea = "ChartArea1";
chrt_ScatterPlot.Series[ds.Tables[0].Rows[i]["locname"].ToString()].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Point;
chrt_ScatterPlot.Series[ds.Tables[0].Rows[i]["locname"].ToString()].Points.DataBindXY(Xdata,Ydata);
chrt_ScatterPlot.DataBind();
System.Web.UI.DataVisualization.Charting.Legend lgd = new System.Web.UI.DataVisualization.Charting.Legend(ds.Tables[0].Rows[i]["locname"].ToString());
lgd.DockedToChartArea = "ChartArea1";
lgd.Docking = System.Web.UI.DataVisualization.Charting.Docking.Right;
lgd.MaximumAutoSize = 30;
lgd.LegendStyle = System.Web.UI.DataVisualization.Charting.LegendStyle.Row;
chrt_ScatterPlot.Legends.Add(lgd);
chrt_ScatterPlot.DataBind();
chrt_ScatterPlot.ChartAreas[0].Axes[0].Title = dd_axisX.SelectedValue.ToString();
chrt_ScatterPlot.ChartAreas[0].Axes[1].Title = dd_axisY.SelectedValue.ToString();
}
</pre>
|
|
|
|
|
A very simple example of Chart Control with Legend colors:
//design side:
<asp:chart id="yourchart" runat="server" Height="280px" Width="250px">
<titles>
<asp:Title ShadowOffset="3" Name="Title1" />
</titles>
<legends>
<asp:Legend Alignment="Center" Docking="Bottom" IsTextAutoFit="true" Name="Default" LegendStyle="Table" />
</legends>
<series>
<asp:Series Name="Default" /></series>
<chartareas>
<asp:ChartArea Name="ChartArea" BorderWidth="0" />
</chartareas>
</asp:chart>
yourchart.Series[0].XValueMember = "YourColumn";
yourchart.Series[0].YValueMembers = "YourColumn";
yourchart.Series["Default"].IsValueShownAsLabel = true;
yourchart.Series["Default"].ChartType = SeriesChartType.Pie;
yourchart.Series["Default"]["PieLabelStyle"] = "Disabled";
yourchart.ChartAreas["ChartArea"].Area3DStyle.Enable3D = false;
yourchart.Legends[0].Enabled = true;
LegendCellColumn LegendTextColumn = new LegendCellColumn();
LegendTextColumn.ColumnType = LegendCellColumnType.Text;
LegendTextColumn.Text = "#LEGENDTEXT";
yourchart.Legends["Default"].CellColumns.Add(LegendTextColumn);
|
|
|
|
|
I just my text in aspx page to be blink ...............
|
|
|
|
|
There was a <blink> tag - it's deprecated a long ago.
Also was a - non-standard - blink value for the text-decoration attribute - also deprecated.
Ah, and the - non-standard - blink() JavaScript function - deprecated.
Blinking text is very problematic - it's makes you site unfriendly for people with accessibility problems.
You can do some blinking text with JavaScript attached to some timer - or maybe use some animated gif. However for most people (designers and developers) it's not professional...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
You can fake it using CSS3 animations:
<p>This is seriously <span class="blink">NASTY</span>!</p>
.blink
{
animation: blink 1s infinite alternate;
}
@keyframes blink
{
from
{
opacity: 1;
}
to
{
opacity: 0;
}
}
http://jsfiddle.net/xX9v6/[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
How to add a context menu in web forms? I want a context menu to be added to a grid and also another context menu outside the grid Without using any third party tool.
Can anyone help me?
|
|
|
|
|
[^]
follow this article you will know how to use context menu in web pages
|
|
|
|
|
Please rply what property should i chanege.
i have already done mode=conditional, childtrigger=false,
|
|
|
|
|
Can you post your update panel html code?
|
|
|
|
|
Hello guys, I don't know whether this is right place for this, can anyone help me with Whatsapp group for. NET AND SQL DEVELOPERS. I would like to join.
|
|
|
|
|
Why Whatsapp? Do you miss something here?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I am debugging an issue on my code caused by KB2894843. I know that MS has made EnableviewstateMAC = true in this KB update. The below piece of code is working fine in redirecting from page 1 to page 2 on click of submit except in the page 2 after redirecting from page 1, post back value is true. It is treating the page 2 as post back but ideally it should be true. I am not sure why it is treat it as post back. Appreciate any help on this.
Page 1 :
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Page1.aspx.vb" Inherits="WebApplication1._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script type="text/javascript">
function f() {
document.form1.action = "Page2.aspx";
document.form1.submit();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Submit1" type="submit" value="Click" onclick="f()" runat="server" />
</div>
</form>
</body>
</html>
Page 2 :
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Page2.aspx.vb" Inherits="WebApplication1.Page2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
Krish
|
|
|
|
|
It's treated as a PostBack because you're posting a form to it which contains a field called __VIEWSTATE .
There are basically three ways to do what you want:
- Remove the
runat="server" from the <form> and <input> tags in page 1. You will no longer be able to access the controls from the code-behind.
<form>
<div>
<input type="submit" value="Click" onclick="f()" />
</div>
</form> - Replace the
<input> tag with an <asp:Button> tag, and set the PostBackUrl to "Page2.aspx" .
<form id="form1" runat="server">
<div>
<asp:Button id="Submit1" runat="server" Text="Click" PostBackUrl="Page2.aspx" />
</div>
</form> - Since you're not passing anything in the request, change your script function to make a
GET request without using the form. You'll need to add return false; to the onclick attribute to stop the form from submitting.
<script type="text/javascript">
function f() {
location.assign("Page2.aspx");
}
</script>
<form id="form1" runat="server">
<div>
<input id="Submit1" type="submit" value="Click" onclick="f();return false;" runat="server" />
</div>
</form>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard. The same piece of code was working fine before the patch. It was returing it as "False" for post back in Page 2. I am just trying to understand what made this patch to broke the code which was working fine.
|
|
|
|
|
|
hi viewers,
i want idea of .net coding for textile design cad software fabric simulation output.
plz help us how to use coding to get fabric like check stripe patterns)output.
if its possible plz share with me source code with samll example
rgds
|
|
|
|
|
Dear all,
I am experiencing the following issue -- Invalid initializer member declarator -- error, on the following line of code.
return new ClaimRole() { query.uUsername = user.Username, query.uPassword == user.Password, user.role = "Trial" };
public UserDetail trial(string username, string password)
{
ClaimRole user = new ClaimRole();
var query = (from s in db.Subscriptions
join u in db.UserDetails on s.sUID equals u.uID
where s.sExpiryDate >= DateTime.Now &&
s.sPID.Value == 163 &&
u.uUsername == username &&
u.uPassword == password
select u).FirstOrDefault();
if (query != null)
{
return new ClaimRole() { query.uUsername = user.Username, query.uPassword == user.Password, user.role = "Trial" };
}
else
{
return null;
}
}
public class ClaimRole
{
public string Username { get; set; }
public string Password { get; set; }
public string role { get; set; }
}
User Detail is data model class from EF database.
My desired output, is to assign role property to the query.
Please advise. Many thanks.
|
|
|
|
|
Your object initializer syntax is messed up. Try:
return new ClaimRole { Username = query.uUsername, Password = query.uPassword, role = query.role };
Object and Collection Initializers (C# Programming Guide)[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Many thanks for your reply and help. That worked. Apology for incorrect object's syntax.
Have a great evening.
|
|
|
|
|
How to display product name, id, pic and a button to add the product in cart ,like a online shopping website in asp.net with vb.net..
please help me out..
makansingh
|
|
|
|
|
|
|
Hello friends.
I built a class (that contains private data)with his own properties and variables.
It contains int , strings , hashtable,datatables or other object built by myself.
The question is ... How can i save class data between posts.
Using session ? mh
Using me.cache (where me is a usercontrol) ? ... it is impossible.
Or serializing my class putting it in the viewstate ?
What is the better way to save a class in a usercontrol or page ?
Thank you very much.
Regards.
|
|
|
|
|
The session should work fine. If it is too complex you may have issues with it serializing but it sounds like you may want to rethink your design and see if you can simplify it some.
Hashtables and datatables likely should go in application cache but that is only if it is not user specific. I guess the answer depends on your specific scenario.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|