|
take Abhishek reply and apply casting.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
yah..
need to cast means
Convert.ToInt32(ord["flag"])
Now It will work.
|
|
|
|
|
here you have declare the variable as nullable.
<nullable> int
try it.
|
|
|
|
|
Hi...
Is there any DateTimePicker Control in ASP.NET....I am using VisualStudio2008...
Thanks..
|
|
|
|
|
use ajax calender control....
|
|
|
|
|
How to use AJAX control....I have't worked on AJAX yet..
Please provide me few sample codes...
Thanks...
|
|
|
|
|
just search on google u can find many free datetime picker control..
|
|
|
|
|
http://www.asp.net/learn/ajax-videos/video-124.aspx
is there links like..
get vb code
get c# code
|
|
|
|
|
see this article[^]
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hello friends,
i'm new to sharepoint developing with asp.net
i need to customize the microsoft's contact management system without creating new
project
how can i proceed this ?
thanks in advance
|
|
|
|
|
Please can anybody tell me,
how to check background printing is enabled or not in client browser through code either in javascript or C#. I have to enable it or atleast to show message to end user to enable it for proper output.
|
|
|
|
|
I have a website hosted in Server which I want to expose it to one client(outside network).I have opened a server side port.Do I need to open client side port also.If not what is the thing which needs to be done?
Thanks in advance
Rao
|
|
|
|
|
You can do it by restricting IP Address in IIS for that site.
|
|
|
|
|
avi_dadi2002 wrote: I have a website hosted in Server which I want to expose it to one client(outside network).I have opened a server side port.Do I need to open client side port also.If not what is the thing which needs to be done?
Does it any thing related with ASP.Net. If you want to share your sites only with your one client, then you have to place the site in a same network. The better option is contact with your Network Team, they can give you better idea to host the side.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
you need to change ur local IP to static IP(contact sys admin)
Then u can access your site over the Internet..
or u just share your desktop to UR client..using logmein or teamviewer..etc
Regards
Rajeesh MP
|
|
|
|
|
What is the use of Ajax concept in Asp.net? can anyone explain?
|
|
|
|
|
|
Given the amount that's been written on the web about AJAX, if you can't work it out with google, I'd say, don't worry about it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Karthick_gc wrote: What is the use of Ajax concept in Asp.net? can anyone explain?
Yes. Check here[^]
and
Read This[^]
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi ,
Ihave a datagrid ,and the code for the date field is some what
<asp:BoundColumn DataField="RegistrationDate" HeaderText="Reg Date" SortExpression="RegistrationDate" DataFormatString="{0:yyyy/mmm/dd}">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
but the date is not comming in the yyyy/mmm/dd format
in the datagrid i enabled the sorting and i am using the following code for that
DataSet ds = CandidateManager.getCandidateDetails(cboStatus.SelectedValue, cboLocation.SelectedItem.Text.Trim(),cboType.SelectedItem.Text.Trim(),txtName.Text.Trim(),txtCurrentOrg.Text.Trim(),txtRegFromDate.Text.Trim(),txtRegToDate.Text.Trim(),m_summaryDetails);
DataView Source = ds.Tables["CANDIDATE_MASTER"].DefaultView;
Source.Sort = e.SortExpression;
Session["Candidate_Sort"] = e.SortExpression;
DGInbox.DataSource = Source;
DGInbox.DataBind();
But the sorting is not happening properly.
It is happening acoording to the month only.
(Actually i want to get the date in yyyy/mmm/dd format
,but getting mmm/dd/yyyy format,and sorting is
happening with month only)
|
|
|
|
|
Your format string isn't quite correct. I don't remember them all, but I know that month is a capital 'M', lowercase 'm' is minute.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
//file1.aspx
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TxtJobID" runat="server"></asp:TextBox>
<asp:TextBox ID="TxtJobTitle" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Update" OnClientClick="return confirm('Are You Sure');" Font-Bold="True" />
<br />
<br />
<asp:Label ID="lblMessage" runat="server" Text="Label" Width="474px"
style="background-color: #00cccc"></asp:Label><br />
<br />
<asp:DataGrid id="DataGrid1" OnItemCommand="ItemCommand"
style="Z-INDEX: 101; LEFT: 175px; TOP: 105px"
runat="server" CssClass="tx-tbl-Gr-lml" Width="474px" AllowPaging="true" >
<Columns>
<asp:ButtonColumn Text="Edit" ButtonType="PushButton" CommandName="Edit">
</asp:ButtonColumn>
<asp:ButtonColumn Text="Delete" ButtonType="PushButton" CommandName="Delete">
</asp:ButtonColumn>
</Columns>
</asp:DataGrid><br />
</div>
</form>
</body>
//file1.aspx.cs
public partial class _Default : System.Web.UI.Page
{
OracleConnection cn;
OracleCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
cn = new OracleConnection("data source=dev;user id=hr;password=hr");
if (!Page.IsPostBack)
{
BindData();
}
}
void BindData()
{
string strsql = "select job_id,job_title from jobs";
OracleDataAdapter da = new OracleDataAdapter(strsql, cn);
DataTable dt = new DataTable();
da.Fill(dt);
DataGrid1.DataSource = dt;
DataGrid1.DataBind();
}
protected void ItemCommand(Object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.CommandName == "Edit")
{
FillTheData(e.Item.Cells[2].Text, e.Item.Cells[3].Text);
lblMessage.Text = "";
}
if (e.CommandName == "Delete")
{
lblMessage.Text = "Need Code to call confirm() frunction ";
}
}
void FillTheData(string job_id, string job_title)
{
TxtJobID.Text = job_id;
TxtJobTitle.Text = job_title;
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string strsql = "Update jobs set job_title="+"'"+TxtJobTitle.Text+"'"+" where job_id="+"'"+TxtJobID.Text+"'";
cmd = new OracleCommand(strsql, cn);
cn.Open();
cmd.ExecuteNonQuery();
BindData();
lblMessage.Text = "Updated Successfully";
}
catch (Exception ex)
{
lblMessage.Text = ex.Message;
}
finally
{
cn.Close();
}
}
}
|
|
|
|
|
define your problem rather then code? put your question first and then put the code.
|
|
|
|
|
the problem is that i want to add confirmation from the user to delete the record when the delete button is pressed in the grid.
i have the code to delete the record. Just need help how to call the cofirm() javascript function.
and what changes should i make in the code to call the function
//file1.aspx
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TxtJobID" runat="server"></asp:TextBox>
<asp:TextBox ID="TxtJobTitle" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Update" OnClientClick="return confirm('Are You Sure');" Font-Bold="True" />
<br />
<br />
<asp:Label ID="lblMessage" runat="server" Text="Label" Width="474px"
style="background-color: #00cccc"></asp:Label><br />
<br />
<asp:DataGrid id="DataGrid1" OnItemCommand="ItemCommand"
style="Z-INDEX: 101; LEFT: 175px; TOP: 105px"
runat="server" CssClass="tx-tbl-Gr-lml" Width="474px" AllowPaging="true" >
<Columns>
<asp:ButtonColumn Text="Edit" ButtonType="PushButton" CommandName="Edit">
</asp:ButtonColumn>
<asp:ButtonColumn Text="Delete" ButtonType="PushButton" CommandName="Delete">
</asp:ButtonColumn>
</Columns>
</asp:DataGrid><br />
</div>
</form>
</body>
//file1.aspx.cs
public partial class _Default : System.Web.UI.Page
{
OracleConnection cn;
OracleCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
cn = new OracleConnection("data source=dev;user id=hr;password=hr");
if (!Page.IsPostBack)
{
BindData();
}
}
void BindData()
{
string strsql = "select job_id,job_title from jobs";
OracleDataAdapter da = new OracleDataAdapter(strsql, cn);
DataTable dt = new DataTable();
da.Fill(dt);
DataGrid1.DataSource = dt;
DataGrid1.DataBind();
}
protected void ItemCommand(Object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.CommandName == "Edit")
{
FillTheData(e.Item.Cells[2].Text, e.Item.Cells[3].Text);
lblMessage.Text = "";
}
if (e.CommandName == "Delete")
{
lblMessage.Text = "Need Code to call confirm() frunction ";
}
}
void FillTheData(string job_id, string job_title)
{
TxtJobID.Text = job_id;
TxtJobTitle.Text = job_title;
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string strsql = "Update jobs set job_title="+"'"+TxtJobTitle.Text+"'"+" where job_id="+"'"+TxtJobID.Text+"'";
cmd = new OracleCommand(strsql, cn);
cn.Open();
cmd.ExecuteNonQuery();
BindData();
lblMessage.Text = "Updated Successfully";
}
catch (Exception ex)
{
lblMessage.Text = ex.Message;
}
finally
{
cn.Close();
}
}
}
Above is the code
|
|
|
|
|
put the button between span tag.
/*
<span onclick=return confirm('Are you sure to Delete the record?')>
<asp:button id="deletelink" text="Delete" runat="server" commandargument="<%#Eval("id") commandname="deletebtn" xmlns:asp="#unknown">
</asp:button>
</span>
*/
Regards
Keyur Satyadev
modified on Thursday, March 12, 2009 8:53 AM
|
|
|
|