|
no worries Thatraja, thanks for your help!
|
|
|
|
|
i have Person table and i want access PersonId in complain table.
DataTable dt = PersonBLL.Select(new Person() { ??????? });
I create select code in BLL.
But what write in place of ????? I don't know.
plz help me...
|
|
|
|
|
Dear All,
I have scenario to encrypt the Password in client side and decrypt it in server side (C# code), this is required for a Online website.
Can any one help me on this task.
- Febin R
-
|
|
|
|
|
For using and saving passwords, you really should not be using encryption, you should really hash your passwords using a salt to be saved in the database. Here[^] is an excellent article that goes through password hashing, and goes into some depth.
Hope it helps
Everyone dies - but not everyone lives
|
|
|
|
|
Just use SSL[^]; that way, the whole request and response will be encrypted for you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
hello, I'm basically following steps as described here[^], building a new MVC4 app with my custom MembershipProvider extending from "WebMatrix.WebData.SimpleMembershipProvider".
Question is, what if I don't want to persists my users in database at all? With SimpleMembershipProvider, you must call "WebSecurity.InitializeDatabaseConnection" from "InitializeSimpleMembershipAttribute \ LazyInitializer.EnsureInitialized" at least once during startup.
Thank you!
|
|
|
|
|
I am reading a file into datatable.
In file I have 3 column but in my datatable 4.
Column 4 in datatable needs to be populated at run time before or after full file is loaded into dt.
how do I do this?
Dim lines = File.ReadAllLines(FileName)
For Each line As String In lines
dt.Rows.Add(line.Split("|"))
Next
|
|
|
|
|
What file you are trying to read from..??
|
|
|
|
|
could you share the information about exceptions.
Exp: in one class i am using more then on exception and also null bull exception.
|
|
|
|
|
One google[^] search will give you lots of results for your query..
|
|
|
|
|
Your question is not clear. Can you be more specific?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
is it possible to create a small application (asp.net) for the managers in the company to search for desired extension and call the extension directly from the application using his/her extension .
thanks in advance
|
|
|
|
|
You can refer this and proceed according to your requirement
Phone Book in C#[^]
else go through google[^]
Hope it will help..
|
|
|
|
|
how Can I Use My Web User Control When I Click On Radio Button Using Java Script? Code Is Given Below Please Help Me
See more: ASP.NETJavascript
Hi i have a web user control LoginControl.ascx, and a userinfo page on which I have two radio button "yes" and "no" for choice for complete your profile now or later
if user select "yes" then a panel be visible for fill the detail and all other things be unvisible using java script when user click on submit ,all information saved in database and this panel does hide and panel of logincontrol(in this panel my logincontrol.ascx is exist) is visible when user log in then it is working but when user click on " no " radio button then use control not working means it's "login" button or "new user" button is not firing any event.
please help me .. i am sharing my code
This is source of web user controlgt;
<asp:panel id="panellogin" runat="server" width="324px">
Please Login here | Email Address | <asp:textbox id="txtlogin" runat="server"> | Password | <asp:textbox id="txtpswrd" runat="server"> | | <asp:button id="btnlogin"
runat="server" text="Login" onclick="btnlogin_Click">
<asp:button id="btnnewuser" runat="server" onclick="btnnewuser_Click"
text="New User">
|
this is code behind of LoginControl(user control)
Collapse | Copy Code
protected void btnlogin_Click(object sender, EventArgs e)
{
dbManager.ConnectionString = ConfigurationSettings.AppSettings["Connectionstring"].ToString();
dbManager.Open();
dbManager.CreateParameters(2);
dbManager.AddParameters(0, "@email", txtlogin.Text);
dbManager.AddParameters(1, "@pass", txtpswrd.Text);
DataSet ds= dbManager.ExecuteDataSet(CommandType.Text, "select * from UserAccount where Email=@email and Password=@pass");
if (ds.Tables[0].Rows.Count == 0)
{
Response.Write("please enter valid email or passwor");
}
else
{
Response.Redirect("Trainer/TProfile.aspx");
}
}
protected void btnnewuser_Click(object sender, EventArgs e)
{
Response.Redirect("Register.aspx");
}
}
Now this code is for userinfo.aspx page
<%@ Page Title="" Language="C#" MasterPageFile="~/Completeprofile.master" AutoEventWireup="true" CodeFile="userinfo.aspx.cs" Inherits="userinfo" %>
<%@ Register TagPrefix="uc" TagName="Spinner"
Src="~/LoginControl.ascx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">
function showhidepanel(rad) {
if (document.getElementById(rad.id + '_0').checked) {
document.getElementById('ContentPlaceHolder1_profilepanel').style.display = 'inline';
document.getElementById('ContentPlaceHolder1_panellogin').style.display = 'none'
}
if (document.getElementById(rad.id + '_1').checked) {
document.getElementById('rowprofile').style.display = 'none';
document.getElementById('ContentPlaceHolder1_profilepanel').style.display = 'none';
document.getElementById('ContentPlaceHolder1_panellogin').style.display = 'inline';
}
}
function showlogin() {
// document.getElementById('ContentPlaceHolder1_profilepanel').style.display = 'none'
document.getElementById('tbll').style.display = 'none';
document.getElementById('ContentPlaceHolder1_panellogin').style.display = 'inline';
}
family
Dear
<asp:label id="username" runat="server" text="Label">
Please Complete your profile<asp:label id="lblmsg" runat="server" forecolor="Red"
text="Label" visible="False">
Would you like to complete your profile now ? <asp:radiobuttonlist id="rbl1" repeatdirection="Horizontal" runat="server" onclick="showhidepanel(this);">
<asp:listitem value="Yes">Yes
<asp:listitem value="No">No
<asp:panel id="profilepanel" runat="server" style="display:none">
style="border-style: outset; width: 100%">
Education <asp:textbox id="txteducatn" runat="server"
ontextchanged="txteducatn_TextChanged">
<asp:requiredfieldvalidator id="reqedu" runat="server"
controltovalidate="txteducatn" errormessage="Education req" font-size="Smaller"
forecolor="Red">
<ajaxtoolkit:validatorcalloutextender id="ValidatorCalloutExtender1"
runat="server" targetcontrolid="reqedu">
Certification <asp:textbox id="txtcertification" runat="server">
Experience <asp:textbox id="txtexprnc" runat="server">
Second Email <asp:textbox id="txtscndemail" runat="server">
Other Contact <asp:textbox id="txtcntact" runat="server">
DOB
<asp:textbox id="TXTDOB" runat="server">
<ajaxtoolkit:calendarextender id="clndrdob" runat="server" targetcontrolid="TXTDOB">
<asp:requiredfieldvalidator id="dobreq" runat="server"
errormessage="DOB Req" controltovalidate="TXTDOB"
font-size="Smaller" forecolor="Red">
<ajaxtoolkit:validatorcalloutextender id="ValidatorCalloutExtender2" runat="server" targetcontrolid="dobreq">
<%-- <ajaxtoolkit:calendarextender id="CalendarExtender1" runat="server" targetcontrolid="txtdate" popupbuttonid="image1">
--%>
Upload your profile pic <asp:fileupload id="prflupload" runat="server">
<asp:button id="submit" text="Submit" onclick="submit_Click" runat="server">
<asp:panel id="panel2" runat="server" style="display:none">
<asp:panel id="panellogin" runat="server">
<uc:spinner id="Spinner1"
runat="server"
minvalue="1"
maxvalue="10">
Please help me Thanks to all of you in ad
|
|
|
|
|
DO NOT cross-post. You've already posted this question in QA[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am trying to add breadcrumbs on my web pages for easy navigation. For this I am using SiteMapPath Control of Asp.Net and along with this I have also made a breadcrumb.Sitemap file which list all the pages. But While implementing the sitemappath in my master page, I am getting a generic error. I am not able to understand why is this happening?
This is the basic structure of my aspx page-
<div id="menu-pt">
<div class="hm"><a href="Page1.aspx" class="active">Home</a></div>
<div id="nav">
<ul id="nav" name="nav">
<li><a href="Page2.aspx">Page2</a></li>
<div class="saparation"></div>
<li><a href="Page3.aspx">Page3</a></li>
<div class="saparation"></div>
<li> <a href="Page4.aspx">Page4</a></li>
<div class="saparation"></div>
<li><a href="#">Pages</a>
<div id ="Ul2" runat="server">
<ul id="sub-nav" >
<li><a href="Page5.aspx">Page5</a></li>
<li><a href="Page6.aspx">Page6</a></li>
<li><a href="Page7.aspx">Page7</a></li>
<li><a href="Page8.aspx">Page8</a></li>
</ul>
</div>
<div id ="Ul1" runat="server">
<ul id="sub-nav" >
<li><a href="Page9.aspx">Page9</a></li>
<li><a href="Page10.aspx">Page10</a></li>
<li><a href="Page11.aspx">Page11</a></li>
<li><a href="Page12.aspx">Page12</a></li>
<li><a href="Page13.aspx">Page13</a></li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<li>Page5,6,7,8.aspx pages is for all users. And <li>Page9,10,11,12,13.aspx pages are for logged in user.
And My breadcrumb.sitemap file is-
="1.0"="utf-8"
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Page1.aspx" title="Home" description="Page1">
<siteMapNode url="Page2.aspx" title="Page2" description="Page2" />
<siteMapNode url="Page3.aspx" title="Page3" description="Page3" />
<siteMapNode url="Page4.aspx" title="Page4" description="Page4" />
<siteMapNode url="" title="Pages" description="">
<siteMapNode url="Page5.aspx" title="Page5" description="Page5" />
<siteMapNode url="Page6.aspx" title="Page6" description="Page6" />
<siteMapNode url="Page7.aspx" title="Page7" description="Page7" />
<siteMapNode url="Page8.aspx" title="Page8" description="Page8" />
<siteMapNode url="Page9.aspx" title="Page9" description="Page9" />
<siteMapNode url="Page10.aspx" title="Page10" description="Page10" />
<siteMapNode url="Page11.aspx" title="Page11" description="Page11" />
<siteMapNode url="Page12.aspx" title="Page12" description="Page12" />
<siteMapNode url="Page13.aspx" title="Page13" description="Page13" />
</siteMapNode>
</siteMapNode>
</siteMap>
Also I have placed a sitemappath control on my aspx page-
<asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath>
Please guide me where I am doing wrong. I read few articles and it says that this much of step is enough for adding breadcrumbs on every pages of a web site.
Please Guide me where I am doing Wrong?
AshOmi
|
|
|
|
|
Cross-posting is never a good idea! So of the big guys may pis of...
You already asked your question in QA - be patient...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Sorry It was by mistake I had posted my question over here. I will keep in mind your suggestion.
|
|
|
|
|
I have a issue. I want to get the value of label control inside datagrid.
I show my code
<asp:datagrid id="dtgThutuc" runat="server" autogeneratecolumns="False" cellpadding="4" gridlines="Horizontal"
bordercolor="#FF6600" borderwidth="1px" showheader="False" width="100%" height="100%" datakeyfield="MaLoaiTT">
<columns>
<asp:templatecolumn>
<itemtemplate>
<asp:label id="lblSTT" runat="server">
<%#getCount()%>
<asp:label runat="server" text="<%# DataBinder.Eval(Container, "DataItem.TenTT") %>" id="lblTen">
<asp:label runat="server" text="<%# DataBinder.Eval(Container, "DataItem.MaLoaiTT") %>" id="MaLoaiTT" visible="False">
| <asp:imagebutton runat="server" imageurl="images/1.jpg" id="cmdMuc1" onclick="cmdMuc1">
|
I want to get the value of "lblTen" control when I click image button "cmdMuc1". please people help me. Thanks a lot
|
|
|
|
|
Assuming C#:
protected void cmdMuc1(object sender, EventArgs e)
{
Control theButton = (Control)sender;
Label theLabel = (Label)theButton.NamingContainer.FindControl("lblTen");
string theValue = theLabel.Text;
...
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
thanks for your answer a lot
|
|
|
|
|
|
Below is the two hyperlinks, when i click one of them the following events must take place:
-set a focus to the active link
-change the background color of the clicked link
I tried to use CSS and JScript but it does not work.
please anyone with the solution there ...HELP
Home About Us
|
|
|
|
|
I have a pair of dropdowns on a asp.net web site. The first dropdown populates when the page renders. The 2nd one populates when something is selected in the first one. My problem is that sometimes, the 2nd dropdown doesn't have anything in it. The drop down part looks like there should be (it's tall enough for about 10 items to be shown), but there is nothing in the box.
When the first combo selection changes, this code is run:
int id = Convert.ToInt32(this.droplistMarkets.SelectedItem.Value);
this.Players = new Players();
this.droplistPlayers.Items.Clear();
this.droplistPlayers.DataSource = null;
this.droplistPlayers.DataBind();
this.Players.Fetch(id);
this.droplistPlayers.DataTextField = "Name";
this.droplistPlayers.DataValueField = "Id";
this.droplistPlayers.DataSource = this.Players;
this.droplistPlayers.DataBind();
this.droplistPlayers.SelectedIndex = -1;
I've verified that the selected item from which the market id is taken is valid, and that the Players object is indeed populated, but the binding fails to work as expected.
Any help would be appreciated. Again, this only fails sometimes.
EDIT ===============================
It's looking like the database query might be the culprit.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 3-Mar-14 11:27am.
|
|
|
|
|
I would wrote it like this, and I'm not sure if Players has a length to measure to make sure you really got data in it, I can't see the Players Object. Just an idea
int id = Convert.ToInt32(this.droplistMarkets.SelectedValue);
this.Players = new Players();
this.Players.Fetch(id);
if (Players.length > 0) {
this.droplistPlayers.Items.Clear();
this.droplistPlayers.DataTextField = "Name";
this.droplistPlayers.DataValueField = "Id";
this.droplistPlayers.DataSource = this.Players;
this.droplistPlayers.DataBind();
this.droplistPlayers.SelectedIndex = 0;
}
|
|
|
|