|
Your best way of doing this is to make your databound value be passed into a code behind method, which would then parse it and return the result to show or hide the sign.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
what is win form user control
|
|
|
|
|
Wrong forum
Anyways, here[^] are the definitions.
जय हिंद
|
|
|
|
|
This is what my firend Google told me
Results 1 - 10 of about 88,400,000 for windows user control[^]. (0.17 seconds)
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Please read the post on how to ask intelligent questions before asking anything here again.
Also, please learn to use some basic research tools.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi sir,
I have created dynamic imagebuttons. In that postbackurl was not working. So i wrote addhandler. I want to open selected image in new window. How to call the selected image id or get the imageurl in img_Click event..?
Dim tRow5 As New HtmlTableRow()
tblParticulars.Rows.Add(tRow5)
tCell = New HtmlTableCell()
tCell.Align = "Left"
tCell.Width = 300
Dim Img As New ImageButton
Img.ID = "AdvImg" & cnt
Txt1 = Ds1.Tables(0).Rows(i).Item("AdvImg")
Img.ImageUrl = "~/Photos/" & Txt1
Img.Height = "70"
Img.Width = "60"
AddHandler Img.Click, AddressOf Me.Img_Click
tCell.Controls.Add(Img)
tRow5.Cells.Add(tCell)
Private Sub img_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
End Sub
|
|
|
|
|
you have to give events like :(in C#)
Img.Click += new EventHandler(Imgbtn_Click);
This will fire the event:
protected void Imgbtn_Click(object sender, EventArgs e)
{
//your code here
}
Padmanabhan
|
|
|
|
|
Sir,
i also did the same thing using foll vb code
AddHandler Img.Click, AddressOf Me.Img_Click
i want to know how to get imageurl or the path of the image so that i can open it in new window when i click the image button in foll function.
protected void Imgbtn_Click(object sender, EventArgs e)
{
//code
}
|
|
|
|
|
hi sir
how can i got src of htmllink (which is in template field of gridview) on code behind.
thank u sir
but i put it Rowdatabound and there is no neweditindex.please suggest what can be next.
modified on Friday, June 19, 2009 2:40 AM
|
|
|
|
|
//write the below code in any one of the events.I prefer RowEditing.
string link = ((TextBox)GridView.Rows[e.NewEditIndex].FindControl("htmllink ")).Text;
Padmanabhan
|
|
|
|
|
use:
e.Row.RowIndex;
Padmanabhan
|
|
|
|
|
In my application I am using query string.But i have faced some problem.when i am passing values which has special characters like (&) or (') it encounters a problem.
it only takes the value before special characters.For eg:if i pass value "Finance&Account" then it only give the value"Finance" at the other page.Is there any way to handle it.
Thanks in advance.
|
|
|
|
|
You need to encode the &, otherwise it means a new variable. There's URL encode methods inside .NET.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
you have to use encode and decode functionality:
//encode
string aa = "Finance&Account";
string url = string.Format("Default1.aspx?name={0}", Server.UrlEncode(aa));
Response.Redirect(url);
//decode
name = Server.UrlDecode(Request.QueryString["name"]);
Padmanabhan
|
|
|
|
|
Hello Friends,
I've a DataList in this DataList i've a Div onclick this <b>Div</b> a popup window opens. And also this div holds some Labels to display the data and a Button onclick this button a Image Url is displayed.
But the problem is as i click on this Button, Image Url is displayed but a popup window is also opened. But i want if i click on Button only ImageUrl is to be displayed otherwise popup window should be opened
|
|
|
|
|
Hi,
Since your button is inside the Div.So, whenever you click on button then Onclick function of Div will also be fired.
Please post your code so that alternate solution can be find
himanshu
|
|
|
|
|
<asp:DataList ID="DataList1" runat="server"
onitemcommand="DataList1_ItemCommand">
<ItemTemplate>
<div id="myDiv" runat="server" class="ARough" onclick="window.open('Admin/Default.aspx','myWindow','width=200,height=200');">
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="width:200px">
<asp:Label ID="lblID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
</td>
<td style="width:200px">
<asp:Label ID="lblAlternateText" runat="server" Text='<%#Eval("AlternateText") %>'></asp:Label>
</td>
<td>
<asp:Button ID="cmdShow" CommandName="Show" runat="server" Text="Show Image Url" />
<asp:Label ID="lblImageUrl" Visible="false" runat="server" Text='<%#Eval("ImageUrl") %>'></asp:Label>
</td>
</tr>
</table>
</div>
</ItemTemplate>
</asp:DataList>
|
|
|
|
|
Hi,
try this
<asp:button id="Button1" onclientclick="Button(this)" runat="server" text="Button">
function Button(e)
{
debugger;
if (window.event)
{
window.event.cancelBubble = true;
}
else
{
e.stopPropagation();
}
alert('Hi from Button');
}
himanshu
|
|
|
|
|
Thnx sir it's working fine but it's throwing an alert message in Flock and after that again opening the popup window. I mean it's not working fine in Flock browser
|
|
|
|
|
Hello,
I am using VS 2005
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If Trim(TextBox1.Text) = "" Or Val(TextBox1.Text) > Val(TextBox2.Text) Or Trim(TextBox2.Text) = "" Or Val(TextBox2.Text) < Val(TextBox1.Text) Then
<<here i="" want="" to="" alert="" message="" box="" user="" that="" there="" is="" some="" problem="" in="" the="" values="" given="" textboxes.
else
...="" 'other="" work
...
end="" if
end="" sub
here="" if="" gives="" :
messagebox.show("wrong="" roll="" number="" ranges","xx",messageboxbuttons.ok,messageboxicon.error,messageboxdefaultbutton.button1,messageboxoptions.defaultdesktoponly)
then="" this="" will="" be="" appread="" on="" server;="" not="" at="" client="" machine;="" so="" have="" call="" javascript="" function="" i.e.="" alert;="" but="" how="" aspx.vb="" file;="" please="" guide="" me.
thanks="" &="" regards
girish="" sharma=""
<div="" class="ForumMod">modified on Friday, June 19, 2009 12:30 AM
|
|
|
|
|
try this
In .aspx file write script
<script type="text/javascript">
function AlertMessage()
{
alert("hi");
}
</script>
and in .vb file call script function
Page.ClientScript.RegisterStartupScript(GetType(ScriptMode), "", "AlertMessage()", True)
|
|
|
|
|
But i have already one java script function block for the page which i have code on the page loade like this:
ClientScript.RegisterClientScriptBlock(Me.GetType, "FilterNumeric", GetNumberValidatorScript())
Now how to go further.
|
|
|
|
|
There is blue underline with "ScriptMode" saying "Type 'ScriptMode' is not defined.
|
|
|
|
|
Sorry friend i know this for C# so that i m telling u..
button.Attributes.Add(
"onClick", "return compareStartAndEndTime();");
Inside ur condition try below code its working for me...... try it out
string script = "<script language='javascript'>";
script += "alert('Patient Id Can not be left blank');\n";
script += "</script>";
RegisterStartupScript("StartUp", script);
modified on Friday, June 19, 2009 2:02 AM
|
|
|
|
|
Thanks for your reply; but it will only fire onclick function; it will not execute the next part of the code which has been written in the Sub..End Sub.
|
|
|
|