|
Use <asp:DataGridView AllowPaging=true PageSize=5>
|
|
|
|
|
|
Hello all,
I have created an application using third party literary and also added the .exe
file in scheduler that will run after every after 1 hour. But the problem is that
before running the code a popup come is displayed and when i click on "OK" button in the popup then the code will start to run. When i setup a task in scheduler then no one will
be there to click on "OK" button in popup and without clicking the button code will not run.
Could you tell me what can do to disable the popup or any other solution?
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
There should be an option to execute the scheduler in SILENT mode??
|
|
|
|
|
Hi
Means in silent mode even if i have not clicked on OK button in popup code will run?
thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Yes - Silent means it wont ask you for confirmation.
Check for the option which would execute the scheduler (.exe) in Silent mode.
|
|
|
|
|
i have made a application in .net 2005 and is using crystal report in that.
my problem is to change the data displayed T runtime after fetching from the database.
like we did in gridview using rowdatabound function and able to change the row.cell text.\
my data displayed is:
c_id status
1 No
2 Yes
3 Not applicable
4 null
5 No
6 Yes
and i want to display it as:
1 granted
2 abandoned
3 pending
4 new application
5 granted
6 abandoned
granted in place of No, abandoned in place of Yes, pending in place of Not applicable and new application in case of null
can anybody help.
thankx in advance
|
|
|
|
|
i am using a jquery control i add library and javascript function on a separate page .it is work fine .But when use master page and kept javascript function in master page then it is not working .
master page code
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPageEntry.master.cs" Inherits="MasterPageEntry" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
// this function is nor working
$(function() {
enterFunction = function() {
$(this).html('ACTIVE');
}
leaveFunction = function() {
$(this).html('inactive');
}
$('.accordion1').hSlides({
totalWidth: 733,
totalHeight: 549,
minPanelWidth: 52,
maxPanelWidth: 423,
speed: 1500
});
$('.accordion2').hSlides({
totalWidth: 305,
totalHeight: 200,
minPanelWidth: 27,
maxPanelWidth: 200,
activeClass: 'active',
speed: 1500
});
$('.accordion3').hSlides({
totalWidth: 730,
totalHeight: 140,
minPanelWidth: 77,
maxPanelWidth: 425,
midPanelWidth: 150,
easing: 'easeOutBounce',
sensitivity: 1,
interval: 50,
timeout: 100,
onEnter: enterFunction,
onLeave: leaveFunction
});
$('.accordion4').hSlides({
totalWidth: 730,
totalHeight: 140,
minPanelWidth: 77,
maxPanelWidth: 425,
panelPositioning: 'bottom',
eventHandler: 'hover',
panelSelector: 'span',
activeClass: 'active_click'
});
}
);
PAGE
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Widget3.aspx.cs" Inherits="JqueryWidget_Widget3" MasterPageFile="~/MasterPageEntry.master" %>
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">
Please tell me that how this will be working.
adilkhan
|
|
|
|
|
When a number eg:10 is entered in textbox & clicking ADD button, then output should have 10 rows in gridview. And next time when if i enter 5 it should display 5 Rows in gridview as dynamically adding rows in gridview.
|
|
|
|
|
private DataTable BindEmptyRows(int noOfRows, DataTable dt)
{
for (int i = 0; i < noOfRows; i++)
{
DataRow dr = dt.NewRow();
dr["SLNO"] = dt.Rows.Count + 1;
dr["ID"] = 0;
dr["STRING"] = string.Empty;
dt.Rows.Add(dr);
}
return dt;
}
|
|
|
|
|
Instead of displaying & initializing text or string i need to display TextBox in all dynamically generated rows.
|
|
|
|
|
Google for ITemplate
This is what you need
|
|
|
|
|
I am a beginner programmer working in ASP.NET for the first time and I am having trouble finding good examples of authentication methods.
I would be very appreciative of anyone who could provide me with examples of the best ways to implement authentication or links to tutorials that may point me in the right direction.
Cheers,
ViridianNZ
|
|
|
|
|
|
Thanks, I'll take a look at that.
|
|
|
|
|
|
I want to locate one button on the right side of the screen, I can use the following code:
Button_my.Attributes.Add("style", "Left:500px;POSITION:absolute");
here Left:500px is just one examle, which should be dependent on screen width, therefore, how to put screen.width instead of some specific value into this code?
thanks.
|
|
|
|
|
use expressions
width: expression((documentElement.clientWidth < 725) ? "725px" : "auto"
similar to this.
|
|
|
|
|
I have a web page that opens and checks status of other locations via a web link. If I get an error where a location is not responding, what is the best way to handle this type of error.
Here is the link;
XPathDocument doc40 = new XPathDocument("http://10.50.6.40:8585/api/get_status?password=f9c598aa58bff2a605495709f772775f&application=Widgetpage");
string state40 = doc40.CreateNavigator().SelectSingleNode("alwaysup-get-status-response/applications/application/state").Value;
Label40.Text = state40;
If the page does not respone, I want a popup that it is not responding and continue to load the page.
Thanks,
|
|
|
|
|
|
I have a user control I'm adding to a placeholder control - and only the first user control is placed properly on the page after rendering.
Here is the html fragment where I add the placeholder to the page. then i dynamically add user controls to the placeholder. Only the first one gets placed properly on the page.
<table>
<tr>
<td align="right">
<table cellspacing="0">
<tr>
<td align="center">
<asp:Label ID="Label12" text="Select a different category: " runat="server"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DropDownListProductFamily" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownListProductFamily_SelectedIndexChanged" ></asp:DropDownList>
</td>
</tr>
<tr>
<td align="center">
<asp:Label ID="Label13" text="(Your order quantities will be saved.)" runat="server" CssClass="notes"></asp:Label>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left">
<asp:PlaceHolder ID="FOBLocationOrderContainer" EnableViewState="false" runat="server" >
</asp:PlaceHolder>
</td>
</tr>
</table>
In FOBLocationOrderContainer I add user controls - but no matter what alignment or left adjustment I make only the first control is placed correctly on the page. What do i need to do to get each user control to be left justified 20px from the left edge of a master page?
|
|
|
|
|
The following code is used for a user control. What it does is if the user presses the arrow up key when the focus is on the input box it will increment the value by one. When I put one of these user controls on a web form it works good. But if I put a second user control on the same web page and when pressing the arrow up key when the focus is on it it increments the value on the first user control. From the code I can see why this happens but how can I have it increment the value on the input box that has the focus?
<%@ Control Language="C#"%>
function TimeEntryHoursOnClick()
{
if (event.keyCode == 38)
document.getElementById("Text1").value = parseFloat(document.getElementById("Text1").value) + 1
}
|
|
|
|
|
You're have to prefix the function name and the control name with the unique id of the user control, e.g.
<%@ Control Language="C#"%>
<script type="text/javascript">
function <%=this.ClientId%>_TimeEntryHoursOnClick()
{
if (event.keyCode == 38)
document.getElementById("<%=this.ClientId%>_Text1").value = parseFloat(document.getElementById("<%=this.ClientId%>_Text1").value) + 1
}
</script>
<input id="<%=this.ClientId%>_Text1" önkeyup="<%=this.ClientId%>_TimeEntryHoursOnClick()" type="text" />
There are better ways of doing this tho such as moving the javascript function outside of the user control and passing the object being changed to the function, i.e.
<script type="text/javascript">
function TimeEntryHoursOnClick(theTextbox)
{
if (event.keyCode == 38)
theTextbox.value = parseFloat(theTextbox.value) + 1
}
</script>
<%@ Control Language="C#"%>
<input id="<%=this.ClientId%>_Text1" önkeyup="TimeEntryHoursOnClick(this)" type="text" />
I haven't tested the code above but it should work.
|
|
|
|
|
Thanks. That worked but I have one other related problem. The user control actually has two input boxes. When TimeEntryHoursOnClick() gets called for Text1 the function also has to reference Text2 as show below. How would I pass that information into the function.
function TimeEntryHoursOnClick(theTextbox)
{
if (event.keyCode == 38)
theTextbox.value = parseFloat(theTextbox.value) + 1
if (event.keyCode == 39)
document.getElementById("Text2").focus();
}
|
|
|
|
|
I am trying to have the button in my gridview create a popup when clicked. I receive this error during runtime after I select "Ok" in the popup.
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
If I make enableEventValidation false, it runs fine, but that's not a secure way to do it. While performing a google search they allude to there being another way, but do not elaborate. Any ideas?
<%@ Page Language="C#" %>
<!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">
<style type="text/css">
body
{
background-color: #CCF0FF;
font-family: Verdana, Arial, Helvetica, Sans-Serif;
font-size: small;
color: Black;
margin-top: 50px;
margin-left: 60px;
margin-right:50px;
border-color: Black;
}
p
{
text-align:right;
}
</style>
<title>Register for Classes</title>
</head>
<body>
<script runat="server">
public string ConnectionPath;
public string register = "Register";
protected void Page_Load(object sender, EventArgs e)
{
try
{
System.Data.DataTable t1 = new System.Data.DataTable();
t1.Columns.Add("LeafName");
t1.Columns.Add("TeacherName");
t1.Columns.Add("SemesterEnds");
t1.Columns.Add("ApplicableTracks");
t1.Rows.Add("Nmap Basics", "Prof. Zhang", "Aug 23 - Nov 3", "ClassDescriptions.aspx#Anchor1");
t1.Rows.Add("Nmap Advanced", "Prof. Scmidt", "Oct 20 - Dec 5", "ClassDescriptions.aspx#Anchor2");
t1.Rows.Add("Nmap Advanced II", "Prof. Strauss", "Jan 5 - Mar 27", "ClassDescriptions.aspx#Anchor3");
t1.Rows.Add("Firewall and Router Fundamentals", "Prof. Williams", "Apr 5 - Jun 26", "ClassDescriptions.aspx#Anchor4");
t1.Rows.Add("Ports and Services", "Prof. Brown", "Oct 20 - Dec 5", "ClassDescriptions.aspx#Anchor5");
SQLQueryClassListings.DataSource = t1;
SQLQueryClassListings.DataBind();
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
</script>
<form id="form1" runat="server">
<div>
<img src="SimBLEND_logo_trans_SMALL.png" />
<a href="main.aspx">Enter</a>
</p>
<br /><br /><br /><br/>
<asp:GridView ID="SQLQueryClassListings" AutoGenerateColumns="false" runat="server" OnRowCommand="ClassGridView_RowCommand"
BorderWidth="1px" BackColor="White" CellPadding="5" BorderColor="Black" RowStyle-BorderColor = "Black"
HeaderStyle-BackColor="#0D69F2" HeaderStyle-ForeColor="White" AlternatingRowStyle-BackColor="#E8E8E8" HeaderStyle-BorderColor="Black" GridLines="Both">
<Columns>
<asp:BoundField HeaderText="Classes" DataField="LeafName" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="250"
ItemStyle-BorderColor="#ADADAD" HeaderStyle-BorderColor ="Black"/>
<asp:BoundField HeaderText="Teacher" DataField="TeacherName" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="200"
ItemStyle-BorderColor="#ADADAD" HeaderStyle-BorderColor ="Black"/>
<asp:BoundField HeaderText="Available" DataField="SemesterEnds" HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign ="Center" ItemStyle-Width="150" ItemStyle-BorderColor="#ADADAD" HeaderStyle-BorderColor ="Black"/>
<asp:HyperLinkField HeaderText="Course Description & Career Tracks" DataNavigateUrlFields="ApplicableTracks"
Text="See Description" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign ="Center" ItemStyle-BorderColor="#ADADAD" HeaderStyle-BorderColor ="Black"/>
<asp:TemplateField HeaderText="Register" HeaderStyle-BorderColor="Black" ItemStyle-BorderColor = "#ADADAD">
<ItemTemplate>
<asp:Button ID="Register" runat="server" CommandName="Register" Text="Register"
OnClientClick="return confirm('You have sucessfully registered!')"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
|
|
|
|