|
How to open a new window when an imagebutton is clicked?
I want that when the imagebutton is clicked it calls a "IncrementAd()" method then it targets the user in another website but i want the window to open in a new window.
How can i make it happen pls??
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
|
|
|
|
|
Is it on Client side, or on Server side?
On clent side, it can be very simple, just write window.open("url", _blank)
On server side check here (at the very end of the thread)
http://www.dotnet247.com/247reference/msgs/31/158269.aspx[^]
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Hi guy I'm new and still learning asp.net(vb).I have 3 GridView in one form ,when page load,only the first GriView to be visible,It has the commandfield(select)when the user clicks the command fiels,make the first one invisible and second one visible(on the position of the first one)The second GridView have 2 commandfiels view(to allow the user to go to the Third GridView) and back(to allow the user to go to the first GridView).
When clicking the view on the second GriView make the second one invisible and third one visible(on the position of the first one). And Allow only the CheckBox of the third GridView to check and uncheck .Lastly Save Button to to save the information in table.
****
Pease guys this is acutellt what I what to do
***Please help me with the code for this
oga m
|
|
|
|
|
Hi,
Firstly on data command og 1st gridview make it visible false and make 2nd visible true and do the same for 3rd to be visible and then on save button click event save the related data.
Hope it helps u...
|
|
|
|
|
Hy everyone,
I need some help. My company has a Nomadix AG 3000 for guest internet access.I need to design a portal page that pass to nomadix ag3000 user name, password and user requested web page.The user name and password works fine. But I have no ideea how to pass the user requested page.
button value="Login">
|
|
|
|
|
Request.RawUrl ?
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Can you tell me how to use request.rawURL insaide my code.
Thank you
|
|
|
|
|
|
I Have a dropdown which the user can add items to using AJAX but I need to prevent Duplicates.
the dropdownlist.Options[index].value returns a number because of the way i'm databinding (i cannot change this).
Is there a Javascript property for the Name That will get me the text in the option tags rather than the value?
|
|
|
|
|
The following function is called upon the onBlur event of the textbox control (txt).
The following code does not work. Description of the function is: Search the ddl (an asp dropdown) for duplicates of the text in txt (asp textbox). Btn is an Asp.net Button that produces a postback and triggers the update panel in which only the ddl resides.
function CheckCaller()
{
var txt = document.getElementById("txtAddCaller");
var btn = document.getElementById("Button1");
var ddl = document.form1.ddlCaller;
var caller = trimAll(txt.value);
var found = "false";
if (caller != "")
{
for (i=0; i
|
|
|
|
|
I found a solution, thanks for looking.
|
|
|
|
|
Hello,
I have an ASP.NET app where I want to display a few labels and images on a page if the user hits the back button on the browser. How would i be able to capture the back button event of the browser on my app ? As in, If someone hits the back button, will any event be fired or can I have a javascript that can capture this event ? iam a little new to ASP.NET so sample code will help too !!!
this is my situation
Page(A)---> Page(B)
if someone presses the back button on Page(B) i want to show Page(A) with certain modifications. Thanks for your help !!!
Regards
RH
|
|
|
|
|
I have two Images that are in Itemtemplate one is sad.gif then the other is laughing.gif. then in EditItemTemplate is a RadioButtonList with two RadioButtons Good Mood and Bad Mood. all are in the same column. This is how it is supposed to work when Good Mood is selected, and insert button is pressed, the image laughing.gif is to be chosen. This code was supposed to work but I don't understand why it's not working:
<asp:Image id=Image1 runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"MoodToday")=="Bad Mood" ?"sad":"laughing" +".gif"%>' ImageAlign="Middle" Visible="False"></asp:Image>
But whether I select Good Mood or Bad Mood only the image laughing.gif is selected. Where could I be going wrong?
Thanks
|
|
|
|
|
I think that the problem is that the Eval method returns a value of type Object , and when you compare that to a string, it will compare them as objects, not as strings. Even if they have the same value, they are not the same object, so the comparison always fails.
Try casting the value from Eval into String .
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks Guffa
It has worked. This is how it worked I had to select Bad Mood By default and the code would be:
<asp:Image id=Image1 runat="server" ImageUrl='<%#"/Images/"+((string)DataBinder.Eval(Container.DataItem,"MoodToday")=="Bad Mood" ?"sad":"laughing") +".gif"%>'>
</asp:Image>
Thanks a lot.
|
|
|
|
|
Why is it that when I insert data I fast get an error :
Specified cast is not valid.
But When I run it the second time I find the data was saved the right image was selected! Actually I can say every thing works well apart that when I atempt to insert data this error appears: Specified cast is not valid. on line:
<asp:Image id=Image1 runat="server" ImageUrl='<%#"/Images/"+((string)DataBinder.Eval(Container.DataItem,"MoodToday")=="Bad Mood"?"sad":"laughing") +".gif"%>' ImageAlign="Middle">.
Thanks
|
|
|
|
|
Hi i have doubt in sqlserver database roles...,
in my sqlserver for a paricular database,i created two application roles..and i given permission for those roles also..,
Now how to tell the roles in my form code.....,
(i.e) how to interact with those roles from my .net codes...,
I dont know how to interact with those roles...,
so plz give me some idea..,if any sample codes will be there...,
it will be more usefull for me...,
Magi
|
|
|
|
|
Hi Magi,
You can achiev this by queryig "sysusers" table from the database.
All the roles are stored in this table.
So you can create sqlcommand for the query "Select * from sysusers" and get them in the form of datatable or datareader.
SqlCommand cmd = new SqlCommand("select dbid, name from sysusers");
I hope this will solve you issue.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
I have freamset in my web application
<frameset rows="138,*" cols="*" framespacing="1" frameborder="NO" border="1" bordercolor="#3366CC">
<frame src="Header.aspx" name="topFrame" scrolling="NO" noresize >
<frameset rows="*" cols="261,*" framespacing="0" frameborder="yes" border="0">
<frame src="Left.aspx" name="leftFrame" scrolling="NO" >
<frame src="main.html" name="mainFrame">
</frameset>
</frameset
in left.aspx file
<form id="form1" runat="server" target ="mainFrame">
and I added button1,button2
i want when user click on button2 change the target of frame from mainFrame to the same page(left.aspx).
I have tried--- Page.Form.Target = "leftFrame"
but it not working
tkml123
|
|
|
|
|
How to access a file residing in the client machine, when the path of the file is given through asp.net. But not through fileupload control.
Can any one help me in this code
|
|
|
|
|
You can't access files on the client machine in asp.net. To do that would be like a virus or spyware. You would have to use some javascript or activex controls. Again these would look like spyware to users. The user must upload the file from their machine to your web server, then you can access the file on the web server.
Ben
|
|
|
|
|
But when a client wants to upload a file to the server. He needs to use the application. Is there any way to do that? If there are activex controls, can you please name them
|
|
|
|
|
If you are using .net 1.1 then you just use a control like this:
If you are using .net 2.0 then you can use the FileUpload control.
Hope that helps.
Ben
|
|
|
|
|
Please help me with this code
*************
Protected Sub ButtonSubMana_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonSubMana.Click
Dim ds1 As New Data.DataSet
Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Dim NumberOfBoxes As Integer
Dim WhichBox As Integer
NumberOfBoxes = Integer.Parse(WhichBox)
Dim rows(NumberOfBoxes) As Integer
Dim Repeater1 As Repeater
For WhichBox = 0 To NumberOfBoxes
Dim txtDate As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtDate"), TextBox)
Dim cmbProjectName As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectName"), DropDownList)
Dim cmbClientSite As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbClientSite"), DropDownList)
Dim cmbProjectManager As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectManager"), DropDownList)
Dim cmbProjectMember As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectMember"), DropDownList)
Dim cmbCategory As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbCategory"), DropDownList)
Dim cmbOccupation As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbOccupation"), DropDownList)
Dim txtHours As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtHours"), TextBox)
Dim CheckBox1 As CheckBox = CType(Repeater1.Items(WhichBox).FindControl("CheckBox1"), CheckBox)
Dim txtDescription As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtDescription"), TextBox)
obj.addTimesheet(txtIDNumber.Text, cmbProjectName.SelectedItem.Text, cmbClientSite.SelectedItem.Text, cmbProjectManager.SelectedItem.Text, cmbProjectMember.SelectedItem.Text, cmbOccupation.SelectedItem.Text, txtDate.Text, Double.Parse(txtHours.Text), txtDescription.Text, CheckBox1.Checked, cmbCategory.SelectedItem.Text)
Next
Dim Manager_Id(0) As Integer
Dim Timesheet(0) As String
Dim i As Integer
For i = Manager_Id To Timesheet
Manager_Id(i) = Manager_Id(i - 1) + Manager_Id(i - Timesheet)
Next
Me.DataSource = Manager_Id
Me.Repeater1.DataBind()
Dim from As MailAddress = New MailAddress("boipelo@ecominstitute.com", "Boipelo Mothusi")
Dim recieve As MailAddress = New MailAddress("sydney@ecominstitute.com", "Synney Masobuka")
Dim message As MailMessage = New MailMessage(from, recieve)
message.Subject = "Using the SmtpClient class."
message.Body = "Using this feature, you can send an e-mail message from an application very easily."
'Dim copy As MailAddress = New MailAddress("Notification_List@contoso.com")
'message.CC.Add(copy)
Dim client As SmtpClient = New SmtpClient("srjhbex01", 25)
client.Send(message)
'If message.To Then
' UserMsgBox("Successfully add")
'End If
End Sub
************
when I chick Button Manager1.information captured in the repeater,be save.It is saving I don't have problem with it.2.Msg to pop-up ,to alert the user that the information has been sent(doesn't work I really don't know what the problem).3.I now have a PROBLEM OF GROUPNG ARRAYS SO THAT,WHEN THE USER CLICK ON THAT BUTTON,IT MUST SEND ONE E-MAIL TO DIFFERENT Project Manager,(for e.g if I captured 2 TimeSheet ,when I click the button send only one mail to the manager not 2,to alert him that there are nwe timesheet need to be approved)
oga m
|
|
|
|
|
Hello
I've posted the question already, but i get no answer. Maybe it was not clear, what's my goal. Thats why I ask again (a bit different;)).
I'm sure most of you know myspace.com. There it's possible to visit a userprofile directly over doaminname/username (e.g. http://www.myspace.com/username). I want to build something like this for my own website. I red about URLRewriting, to change the URL into the global.asax (Application_BeginRequest). But this is only possible, when the Directory whith the specific username exists, and into it, there have to be a default.aspx File. Is this right?
Do I really have to create all these Directories and Files? Its not a big work, but it doesn't look really nice.
I thought also about the possibility to change the 404Error File into an .aspx File and handle it there. Is this the solution?
Or which is the right/professional way?
Best regards
succo
|
|
|
|