|
Second one is correct.
Rharzkie wrote: in the other code, the 1st button is only functioning..
It depend on what this variable got. dim keyin as integer
My example ~
Private Sub ToolStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStrip1.ItemClicked<br />
Select Case e.ClickedItem.Text<br />
Case "&New" : MessageBox.Show("this is New")<br />
Case "&Open" : MessageBox.Show("this is New")<br />
End Select<br />
End Sub<br />
<br />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
in your example, the case "&New" and case "&Open" stands for what??? is it integer or string??? where did you get it???
|
|
|
|
|
Friend WithEvents NewToolStripButton As System.Windows.Forms.ToolStripButton<br />
Friend WithEvents OpenToolStripButton As System.Windows.Forms.ToolStripButton<br />
<br />
Me.NewToolStripButton.Text = "&New"<br />
Me.OpenToolStripButton.Text = "&Open"<br />
<br />
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripButton, Me.OpenToolStripButton)<br />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
but in the second code i made, the first button is only funtioning...
i will try your example...
|
|
|
|
|
Rharzkie wrote: but in the second code i made, the first button is only funtioning...
What did you set to "keyIn " variable??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
keyin as integer...thats all...
but i already try your example, and it works, thanks for that...
|
|
|
|
|
Rharzkie wrote: but i already try your example, and it works, thanks for that..
Your welcome. my friend. If it is useful for you, don't forget to vote the message. Thank you too.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi,
I am working on gridview. while deleting the record i am getting the error as
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
my code is
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int empid=0;
empid = Convert.ToInt32(GridView1.DataKeys[e.RowIndex]);
cmd = new SqlCommand("delete employee where empid='" + empid + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
please give me what is the syntax for it.
can any one help me urgently
thanks!
|
|
|
|
|
Hi change ur rowindex value or empid value after that u will get other wise reply to me i will give code for u ..
Reg
Nantha
|
|
|
|
|
Hi,
Set e.EditEndex=-1 After deleting the row.
Naresh Patel
|
|
|
|
|
thanks your guidance.
can u send me code please
|
|
|
|
|
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int empid=0;
empid = Convert.ToInt32(GridView1.DataKeys[e.RowIndex]);
cmd = new SqlCommand("delete employee where empid='" + empid + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
e.EditIndex=-1;
}
Naresh Patel
|
|
|
|
|
Hi try this ...
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int n = Convert.ToInt32(GridView1.DataKeys[e.RowIndex]);
int empid=n-1;
cmd = new SqlCommand("delete employee where empid='" + empid + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
in case not working send full functionality about this grid view process
|
|
|
|
|
I am giving you only Idea, not implementation.
Ok
Naresh Patel
|
|
|
|
|
very thank you Naresh Patel
|
|
|
|
|
Hi friends
I want to display reverse fileUpload control.I mean,normally fileupload display first textBox and One Button to browse file.I want to display first Button and then Textbox.
Is it possible?
Thanks in advance
Pathan
---------------------------------------------------
|
|
|
|
|
Imran Khan Pathan wrote: Is it possible?
Yeah. It is possible. there is a trick for it.
1. Add one button (let's say btnUpload) and textbox (txtPath) in your page.
2. Add HTML "input=File"
3. Make this "file" control as invisible. (CSS: opacity or alpha )
CSS - Code
<br />
filter:alpha(opacity=50);<br />
-moz-opacity:0.5;<br />
opacity: 0.5;
4. Write a JS function to fire the click event of input "file" control.
function fireFileClick()<br />
{<br />
var objfile = document.getElementById('myFile');<br />
objfile.click();<br />
<br />
var objTextBox = document.getElementById('txtPath');<br />
objTextBox.value = objfile.value;<br />
}
5. Add this function on click event of button "btnUpload"
<input type="btnUpload" onclick="fireFileClick();" <br />
value="Upload File" >
That's all..
Please follow the steps that I mentioned. Let me know the result.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael
Thanks for ur response.
I have done it.Its working fine in IE7 but I am not getting Click Event of Button In mozila.
whats a problem?
Thanks again
Pathan
---------------------------------------------------
|
|
|
|
|
Try this code ~
----------------------------------
<!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>
<title>Untitled Page</title>
<style type="text/css">
.file{
filter:alpha(opacity=0);
-moz-opacity .0;
opacity: 0.0;
position:absolute;
left: -150px;
}
</style>
<script language="javascript" type="text/javascript">
function fireFileClick(){
var objfile = document.getElementById('myFile');
objfile.click();
var objTextBox = document.getElementById('txtPath');
objTextBox.value = objfile.value;
}
</script>
</head>
<body>
<input id="myfile" type="file" class="file" />
<input type="button" id="btnUpload" value="Upload" onclick="fireFileClick();" />
<input type="text" id="txtPath" />
</body>
</html>
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
look michael I want to use this trik in my web side but the page is including master page and i want to use fileupload not input upload i tried it but it gives me some errors i'll post you the code to see it and if you could help me i will be grateful to you
the code
<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage1.master" AutoEventWireup="false" CodeFile="~/admin/decleration_edit.aspx.cs" Inherits="decleration_edit" Title="تعديل كلمة الوزير" StylesheetTheme="style1" Theme="style1" %>
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">
<asp:fileupload id="FileUpload1" runat="server" enabletheming="True">
<asp:button id="Button1" runat="server" onclientclick="fireFileClick()"
="" text="تصفح....." onclick="Button1_Click">
<asp:textbox id="TextBox1" visible="false" runat="server" height="16px" style="right: 23px; position: relative;
top: 2px" width="152px">
thx
let's work together |
|
|
|
|
|
Hi ahmed_fci2006,
Can you post your code again with "Ignore HTML tags in this message" checked? I can't see your code clearly..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
<%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="false" CodeFile="final.aspx.cs" Inherits="test_Default" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
<!--
<!--
function fireFileClick()
{
var objfile = document.getElementById("<%= File1.ClientID %>");
objfile.click();
var objTextBox = document.getElementById("<%= Text1.ClientID %>");
objTextBox.value = objfile.value;
}
</script>
<br />
<asp:FileUpload ID="File1" runat="server" />
<br />
<asp:Button ID="Button1" OnClientClick="fireFileClick()" runat="server" Text="ASPNET Button" />
<input id="Text1" type="text" runat="server" />
<br />
<br />
<input id="Button2" type="button" onclick="fireFileClick()" value="HTML Button" />
<br />
<br />
</asp:Content>
let's work together
|
|
|
|
|
what is the code for recurrence(reminder) in calendar....
Recurrence means repeating activity periodically...
Daily, Weekly, Monthly, Yearly
System will ask for start and end time each interval types.
System will have option to select a day e.g. every Friday - Weekly interval
System will have option to select a date e.g. every 15th - Monthly interval
System will have option to select a date and month e.g. very 15th of June - Yearly interval
|
|
|
|
|
1. Read the forum guidelines.
2. Give your messages titles with meaning.
3. Do you own homework.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
I'm new in asp
so I started with downloading IIS 6.0 from internet, then I installed it on my system.. anyways , install is succesfull, but IIS doesnt appear on my services list.. It must be very simple but I would appreciate if sbody does help me..
|
|
|
|