|
First of all use a link button. Then in the html of the desgin add the name of your method to the controls onclick event. For example
<asp:LinkButton id="gridLink" runat="server" onclick="YourMethod">
then public sub YourMethod(ByVal sender As Object, ByVal e As System.EventArgs)
dim lb as linkbutton = ctype(sender, LinkButton);
'lb.namingcontainer is the datagrid row
'use findcontrol method to access other controls in the row.
end sub
-- modified at 8:36 Wednesday 26th July, 2006
|
|
|
|
|
Hope code below would help you..
Private Sub grdkeyWord_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles grdkeyWord.ItemDataBound<br />
Dim link As HyperLink<br />
<br />
If e.Item.ItemType <> ListItemType.Header And _<br />
e.Item.ItemType <> ListItemType.Footer Then<br />
link = CType(e.Item.FindControl("lnkKeyWord"), HyperLink)<br />
link.Target = "_blank"<br />
link.NavigateUrl = "viewerDefinition.aspx?definitionID=" & e.Item.Cells(0).Text<br />
link.Text = e.Item.Cells(3).Text<br />
<br />
End If<br />
End Sub
postmaster
www.programmingknowledge.com
|
|
|
|
|
What are some starting points for learning about how to create and show custom right click pop "command bars" in Web Forms?
Thanks!
FAW
|
|
|
|
|
r u asking about Right Click ContextMenu???
Nav.
|
|
|
|
|
1) Learn about the event model in different browser
2) Learn Javascript
|
|
|
|
|
How can create ADynamic menu in asp.net ?
Conditions is :=
1. menu information are store in database
2.
|
|
|
|
|
Sorry it is vb.net but it had to be. Now here is what I did using a treeview in 2.0. Now go try google.
ViewState("MenuSearch") = ""
Dim dst As DataSet
dst = GetMenuData(EffectiveDate)
TreeView1.Nodes.Clear()
For Each masterRow As DataRow In dst.Tables("Header").Rows()
Dim masterNode As New TreeNode(masterRow("MenuText").ToString())
masterNode.Collapse()
masterNode.Target = ""
If masterRow("FileID").ToString() <> "0" Then
masterNode.Value = masterRow("FileID").ToString()
masterNode.SelectAction = TreeNodeSelectAction.Select
Else
masterNode.SelectAction = TreeNodeSelectAction.None
End If
TreeView1.Nodes.Add(masterNode)
For Each childRow As DataRow In _
masterRow.GetChildRows("Children")
Dim childNode As New TreeNode(childRow("MenuText").ToString())
childNode.Value = childRow("FileID").ToString()
masterNode.ChildNodes.Add(childNode)
Next
Next
Public Shared Function GetMenuData(ByVal EffectiveDate As Date) As DataSet
Dim conn As SqlConnection
conn = PennLink.Security.ConnectionManager.GetConnection()
Dim dst As New DataSet()
Dim daHeader As New SqlDataAdapter()
Dim cmd As SqlCommand = GetSQLCommand("dbo.uspGetMenuHeader", conn)
AddEffDate(cmd, EffectiveDate)
daHeader.SelectCommand = cmd
'Load Header DataSet
conn.Open()
daHeader.Fill(dst, "Header")
conn.Close()
'Load Detail DataSet
cmd.CommandText = "dbo.uspGetMenuDetail"
Dim daDetails As New SqlDataAdapter
daDetails.SelectCommand = cmd
conn.Open()
daDetails.Fill(dst, "Details")
dst.Relations.Add("Children", _
dst.Tables("Header").Columns("MenuID"), _
dst.Tables("Details").Columns("MenuID"))
Return dst
End Function
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Please tell me about the project.....
siva
|
|
|
|
|
|
|
in Visual Studio click File Menu then New and there you will find Project
hope this will solve ur problem or u need code:->
Nav.
|
|
|
|
|
The first rule of the "project" is that you dont talk about the "project".
|
|
|
|
|
i have found MSN messenger library but i have not found yahoo messenger library developed in c#, which i can use in my developed e-buddy.com web site. if any one has, provide me.
Thanx in advance........
|
|
|
|
|
try oleview.exe
if you cant find then your answer is no
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
i have problem that how to redirect a page and transfer info or data from one page to another page. if any one knows provide me the help.
and what is difference between onInit and onLoad methods,
because when i clicked a button both onInit and onLoad methods call again.
|
|
|
|
|
Response.Redirect to another form with this URL
Following code snippet shows how it works:
Source Web Form
private void Button1_Click
(object sender, System.EventArgs e)
{
string url;
url="anotherwebform.aspx?name=" +
TextBox1.Text + "&email=" +
TextBox2.Text;
Response.Redirect(url);
}
Destination Web Form
private void Page_Load
(object sender, System.EventArgs e)
{
Label1.Text=Request.QueryString["name"];
Label2.Text=Request.QueryString["email"];
}
Using Session variables
This is yet another way to pass values across pages. The typical sequence of steps will be as follows:
§ Create the web form with controls
§ Provide some button or link button that posts the form back
§ In the click event of the button add session variables and set them to control values
§ Response.Redirect to another form
§ In that form access Session variables and remove them if necessary
Following code shows this in action:
Source Web Form
private void Button1_Click
(object sender, System.EventArgs e)
{
//textbox1 and textbox2 are webform
//controls
Session["name"]=TextBox1.Text;
Session["email"]=TextBox2.Text;
Server.Transfer("anotherwebform.aspx");
}
Destination Web Form
private void Page_Load
(object sender, System.EventArgs e)
{
Label1.Text=Session["name"].ToString();
Label2.Text=Session["email"].ToString();
Session.Remove("name");
Session.Remove("email");
}
Using Server.Transfer
This is somewhat complex but sophisticated method of passing values across pages.
The entire process works as follows:
§ Create the web form with controls
§ Create property Get procedures that will return control values
§ Provide some button or link button that posts the form back
§ In the button click event handler call Server.Transfer method that will transfer execution to the specified form
§ In the second form you can get a reference to the first form instance by using Context.Handler property. Then you will use the get properties we created to access the control values.
The code to accomplish this is somewhat complex and is shown below:
Source Web Form
Add following properties to the web form:
public string Name
{
get
{
return TextBox1.Text;
}
}
public string EMail
{
get
{
return TextBox2.Text;
}
}
Now, call Server.Transfer.
private void Button1_Click
(object sender, System.EventArgs e)
{
Server.Transfer("anotherwebform.aspx");
}
Destination Web Form
private void Page_Load
(object sender, System.EventArgs e)
{
//create instance of source web form
WebForm1 wf1;
//get reference to current handler instance
wf1=(WebForm1)Context.Handler;
Label1.Text=wf1.Name;
Label2.Text=wf1.EMail;
}
Vipin
|
|
|
|
|
i am developing e-buddy in ASP.NET but i dont know how the pop-up windows can appear in bottom-right corner as a alert for signed-in or signed-out.
plz if anybody know, give me help
|
|
|
|
|
in codebehind:
protected void btnDisplayPopUp_Click(object sender, EventArgs e)
{
Page.RegisterStartupScript("MyPopUpScript", @"<script type='text/javascript'>window.open('http://server_name/app_name/pop_up_window_page.html');</script>");
}
in aspx page:
<aspx:Button runat="server" id="btnDisplayPopUp" OnClick="btnDisplayPopUp_Click" Text"Open pop up window"/>
You can alter javascript window.open() method as you need:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp
Pilo
-- modified at 7:44 Wednesday 26th July, 2006
|
|
|
|
|
hi all
i am using datalist,in the data list using panel
i want panel visible true on mouseover hyperlink,
wht mistake on this code,
hyperLink.Attributes.Add("onMouseOver", "document.getElementById('" & panel.ClientID & "').visible=true;return true;")
paz help me
thanks
|
|
|
|
|
hi...
try....
hyperLink.Attributes.Add("onMouseOver", "document.getElementById('" & panel.ClientID & "').style.visibility='visible';return true;")
|
|
|
|
|
hi,
it's not coming
thanks
|
|
|
|
|
hi...
not coming?....mhhhh
check if your panel have the "style" attribute visibility ?!...
|
|
|
|
|
hi,
i am using inside datalist,
thats is the problem,
not using css
thnaks
|
|
|
|
|
|
Hi All,
I am developing ecommerce site using asp.net1.1 .In this site I need to integrate Paypal controls for secure payment transactions.
I have installed paypal webcontrol's setup now paypal controls are available in my toolbox.
But I don't know how to write code for ADD TO CART or BUYNOW I can only drag and drop controls on form but i can write any code to use them.
Can anybody tell me how to use them.Should I code something or any webservice I can use directly to use this paypal controls.
I hope somebody help me.
Thanks,
Nagraj
|
|
|
|