|
Things to check:
1. Make sure your database engine is configured to accept remote connections.
2. Check the SQL Server service account.
3. If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings in your ASP.NET application. Check you Connection Strings, probably issue is there.
4. You may need to create an exception on the firewall for the SQL Server instance and port you are using
5. Check SQLBrowser; check that it is running.
6. Check that you have connectivity to the SQL Server.
|
|
|
|
|
Hi
I have create three IFrame in same asp.page . But while logout from individual frame it is coming to login page with in frame
But i want to come out from total iframe page . Pl Help me for the code
|
|
|
|
|
are you want to log out from iframe? or you just want to close iframe?
|
|
|
|
|
I have a navigation bar which shows the type of recipe. eg: healthy recipe, desserts, etc...
I have a gridview on the same page. I want the data in the gridview to be populated as per the selection on navigation bar.
I am using VS2010 and sqldatasource to bind with database.
I google a lot but cant find any article based on populating gridview with context to navigation bar.
Plz help.
|
|
|
|
|
Try to Use Query String , in which you can pass any value through url, according to that value you an bind gridview using sql data source
http://www.dotnetperls.com/querystring[^]
follow this link you can learn how to use query string
|
|
|
|
|
hi, I use visual studio 2013 ultimate software for web Asp.net web forms application using vb code and I want to introduce a database but I am a beginner and I do not know anyone can be koi help me and thank you
|
|
|
|
|
File->new->website
select asp.net ( vb)
1.press ( Ctrl+shift+A) to add new item
2.select the database file which is having *.mdf file extension
3.add the file. it will be added to the project's solution explorer and also in server explorer.
continue with your coding
1.make connection string
2.connection open
3.sql query like (insert, update ) query
4.connection close
|
|
|
|
|
our coach gave me an excel file that contains information about Employers I want to put it under visual studio 2013 ultimate and I know how to do it
|
|
|
|
|
|
I have my ProfileCommon Class below
using System.Web.Profile;
public class ProfileCommon : ProfileBase
{
public string LastName
{
get
{
return (string)base["LastName"];
}
set
{
base["LastName"] = value;
this.Save();
}
}
public ProfileCommon GetProfile(string userName)
{
return (ProfileCommon)ProfileBase.Create(userName);
}
}
And the Profile section in the windows service app.config file is below
<profile enabled="true" defaultProvider="SqlProfileProvider" inherits="MyWindowsService.Code.ProfileCommon">
<providers>
<clear />
<add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="MyConnString" applicationName="Application1" />
</providers>
</profile>
And when i call sample code below
ProfileCommon prf1 = new ProfileCommon();
ProfileCommon prf = prf1.GetProfile("myWindowsLoginName");
string name = prf.LastName;
I get an error "Could not load type 'MyWindowsService.Code.ProfileCommon' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'."
What am i doing wrong in those sample code snippets? OR is this even the right way of using ProfileCommon in a windows service (.NET 4.0), is this wrong all together, is there a better way.
All i want is given a userName, i should get that user's Profile LastName or FirstName from LDAP.
|
|
|
|
|
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.
|
|
|
|