|
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;
}
|
|
|
|
|
But you should be able to bind to an empty list, right?
".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
|
|
|
|
|
I haven't used the bind in a long time, I would have to run a test on it.
your probably going to have to add some diagnostic code to see whats happening, like in PHP.
Something is getting unreliable in your code somewhere, it may be the bind and your not binding the 2nd time, thus no records are fetched. Perhaps the bind object is locking up the 2nd or 3rd time around.
Just make sure you have data first before you start jumping around on it.
|
|
|
|
|
Are you sure that this.Players.Fetch(id); returns only after the Players list got filled from the database - i.e. it is not starting a thread to fill the list and returns when the thread was started (but not yet finished)?
|
|
|
|
|
I'm using SqlCommand.ExecuteReader - a synchronous call. The problem is the binding code. I thought I had it fixed but it happened again this morning. Even worse, it NEVER happens on my local machine, only on the deployed web site.
".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
|
|
|
|
|
John Simmons / outlaw programmer wrote: it NEVER happens on my local machine, only on the deployed web site. That's the fun we developers have to experience sometimes...
I personally do not like Binding, it is too much "magic" behind the scenes, I prefer to fill the Items collection manually. What about trying that old-fashioned method in this stubborn case?
|
|
|
|
|
Ok, so have a task I need to complete asap. in an existing C# web application I have been asked to create a wizard type page.
(only on this page, the steps are stored in a few tables containing - 1) what the step is, 2) the verbatam, 3) the possible responses)
So the questions are:
how do I dynamically load the controls of the step I am currently looking at.
how do I dynamically read the the values selected to save into a database?
How do I move to the next step?
Help!!!
Thanks!
|
|
|
|
|
|
Hi,
We develop an ASP.Net Web Application an in some pages we need to open a new url with parameters from javascript with input type=button, my problem is when use the
window.open("url?id='2'&name='xyz'");
the parameters key and value are shown in the url and it is less secure, please help me to use any way to pass parameters without show it in the url, or help me to hide the url content if it is possible.
Please help me ASAP.
Thanks All
|
|
|
|
|
Try to change the target of your form in which the button is - all your form elements will be posted the the new page...
<script type="text/javascript">
function buttonHandler()
{
form=document.getElementById('IdOfForm');
form.target='_blank';
form.action='newpage.aspx';
form.submit();
form.action='';
form.target='';
}
</script>
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 may want to try encrypting the data in the query string values and obfuscate the query string parameters
?dIU=sddsfsdf=&nA=gfhfgh=
|
|
|
|
|
I have developed a web page using asp.net in dream weaver and sql server 2000 but when it comes to displaying the page on a web broswer. it gives the following output. Please help this is my assignment to job a job.
<%@LANGUAGE="VBSCRIPT" AutoEventWireup="true"
CodeBehind="Default.sampl.aspx"
Inherits="WebApplication"
%>
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_asp_STRING
MM_editCmd.CommandText = "INSERT INTO dbo.login (username, pass) VALUES (?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 60, Request.Form("username")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 60, Request.Form("pass")) ' adLongVarChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "sampl.asp"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Set Command1 = Server.CreateObject ("ADODB.Command")
Command1.ActiveConnection = MM_asp_STRING
Command1.CommandText = "INSERT INTO ( ) VALUES ( ) "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_asp_STRING
Recordset1_cmd.CommandText = "SELECT * FROM dbo.login"
Recordset1_cmd.Prepared = true
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body,td,th {
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
color: #30F;
}
a {
font-family: Georgia, "Times New Roman", Times, serif;
}
</style>
<link rel="stylesheet" title="Disabled for Preview-in-Browser: css.css" type="text/css" />
<style type="text/css">
form {
font-size: 14px;
color: #009;
}
body{animation:ease-in-out running;
backface-visibility:visible;
background-image:inherit;
font-family:"Times New Roman", Times, serif;
font-size:14px;
alignment-adjust:central;
border-color:#906;
border-image:auto;
appearance:desktop;
clip:rect(top right bottom left);
}
h1
{ font-family:Tahoma, Geneva, sans-serif;
font: signature;
font-size:large;
}
</style>
</head>
<body>
<a name="ASPIRE" id="ASPIRE"></a>
<div> <h1> THIS IS REMARKABLE STEP </h1></div>
<div> <iframe src="images/icon.fw.png"> </iframe> </div>
<hr align="center" size="12" noshade="noshade" color="#CC3300" />
<form name="login" >
<br />
<form action="<%=MM_editAction%>" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">Username:</td>
<td><input type="text" name="username" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Pass:</td>
<td><input type="text" name="pass" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" value="SUBMIT" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p>
</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
|
|
|
|