|
I wrote a custom combobox that uses an image button. However, if the user changes their desktop motif, then the button images on my combobox won't change, which doesn't look very good, expecially if there are any regular drop-down-lists on the page.
Is there a way to determine which motif the desktop is using with javascript, vbscript, or something else?
An alternative would be to "sample" the color of one or more points in the button area of a regular drop-down-list on a page before the one my combobox is displayed on, then use this information to determine the motif, and have my aspx's code select the right button-set for my combobox when building the page. How can I "sample" the color of a drop-down-list's button?
Incidently, I'm using IE6 SP6 with VB.Net 2003 with client-side javascript for my target browser and the development language.
Thank you
|
|
|
|
|
I am having difficulty with a detail button on a datagrid, I just need a button or something next to each record I list, when the user clicks it I give them more detail or something. I immediatly went to the Microsoft help and found an example where they do this:
<asp:datagrid id="ItemsGrid" bordercolor="Black" showfooter="False" cellpadding="3" cellspacing="0" headerstyle-backcolor="#aaaadd" onselectedindexchanged="IndexChange_Command" runat="server">
<columns>
<asp:buttoncolumn text="Select" commandname="Select">
they declare this:
Sub IndexChange_Command(sender As Object, e As EventArgs)
' Display the details of the selected item.
DetailsLabel.Text = _
"Item Number: " & ItemsGrid.SelectedItem.Cells(1).Text & " " & _
"Description: " & ItemsGrid.SelectedItem.Cells(2).Text & " " & _
"Price: $" & ItemsGrid.SelectedItem.Cells(3).Text & " "
End Sub
I run their example and it works the IndexChange gets called when I click a link in the table. (I did not include all the detail where the fill the grid that works fine) so I decide to try the same thing and declare this:
<asp:datagrid id="DataGrid1" runat="server" width="959px" height="94px" caption="Lots Currently Running" allowsorting="True" allowpaging="True" allowcustompaging="True" onsortcommand="Sort_Grid" onselectedindexchanged="IndexChange_Command">
<columns> <asp:buttoncolumn text="Select" commandname="SelectCurrentLot" buttontype="PushButton">
And declare this:
Sub Select_CurrentLot(ByVal sender As Object, ByVal e As EventArgs)
' Display the details of the selected item.
DetailsLabel1.Text = "You Clicked " & DataGrid1.SelectedItem.Cells(1).Text
End Sub
My grid shows up, gets populated, but when I click the button nothing gets called... where oh where did I go wrong? I am new at this so there may be something else I am missing... BTW, the Sort_Grid works fine.
Thanks in advance
P.S. as a side question I am using VS .NET, I wss putting my code in XXX.aspx.VB, HTML and such in XXX.ASPX, the MS example has it all in one XXX.aspx with runat server directives) is there any particular reason for this?
|
|
|
|
|
If you add a new button column to your datagrid, then set the commandname to something like select. Then in the itemcommand you can do whatever display stuff you need to do. Here is a link to microsoft help that shows how to add a button column.
http://msdn2.microsoft.com/en-us/library/aa984252(VS.71).aspx[^]
Hope that helps.
Ben
|
|
|
|
|
Thanks for the help, but I think I am still missing something.
I create an event handler as follows:
<br />
Private Sub DataGrid2_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid2.ItemCommand<br />
' Display the details of the selected item.<br />
DetailsLabel1.Text = "TEST"<br />
End Sub
When the grid displays I have the buttons I woudl expect but when I click them this procedure does not run, it seems to run the page_load event
Am I missing something else?
|
|
|
|
|
You might need to set itemCommand method in the datagrid in the html
OnItemCommand="DataGrid2_ItemCommand". At least that is how I usually connect up those type of events. YOu also need to make sure you have set the commandname property in the button in the datagrid.
Hope that helps.
Ben
|
|
|
|
|
Thanks, that fixes it. Appreciate your help
M
|
|
|
|
|
Hi Everyone,
I have a problem with my classic asp programming. I think I missed something. I encountered logical error an hour ago. And below is one of the lines in my source code wherein I encountered error.
As looking on the code below, I don't know if what was lacking, because it won't satisfy the condition, and it won't go to the next line "SaveRecord".
I am actually generating a checkboxes, dynamically and the checkboxes are based from the CategoryID. if the checkbox is checked then the value is not equal to "". The question is how am I be able to test the value if it will be checked or not?
btw, in relation to this topic, if you'll have another idea about this matter please let me know. thanks in advance.
if Request(CStr(rsCategory("CategoryID"))) <> "" then
SaveRecord
End If
hifiger2004
|
|
|
|
|
I'm having trouble setting up a web site for my beta testers. On my local everything runs perfectly but the on the server, the web session doesn't seem to be remembered.
Here's the session state part of my web.config file
<sessionstate
="" mode="InProc" cookieless="false" timeout="20" stateconnectionstring="tcpip=127.0.0.1:42424" sqlconnectionstring="data source=127.0.0.1;userid=sa;password=">
I've tried using StateServer instead of InProc with the server running the session state process but still no luck. From what I understand, InProc should be fine if you're on a single server with only a couple fields stored in the session state anyway.
Thanks in advance!
|
|
|
|
|
Does your test system have underscores in the domain name? IE has problems maintaining session state if this is the case...
|
|
|
|
|
Nope, the domain and server names don't have any special characters. I'm thinking it might be because I haven't run aspnet_regsql.exe yet (discovered while googling). It doesn't seem like doing that would have anything to do with sessions but I'm running out of ideas.
Thanks for your answer though :v)
|
|
|
|
|
We do plan to include a SessionStateProvider class in our next beta, so I wanted to make you aware of this technology.
You are encouraged to download the current Persistore beta and experiment with it, it will be possible to persist session and other data in ASP.NET apps easily and efficiently.
The current beta includes a basic implementation of a MembershipProvider, which may be enough to whet your appetite. (Our own website uses it for user registration and login etc).
Questions, comments etc always welcome.
Hugh
|
|
|
|
|
Hi,
I got a requirement to develope an application which takes care for monitering the internet connection of a customer and it directs the customer to resolve some basic issues related to connection failure by himself with appropriate guidance provided.Here i have a big question whether i go for developing a WebApplication or Desktop Application.
Here r some possible issues that may be rised on the client side
1.cable is not connected properly
2.modem issues
3.system performance is low
also guide me which services are available in .net to access wether is system is connected to the internet or not and some relevant info
i am working on VS2005 ,Xp professional OS
kyreddy
|
|
|
|
|
Hi, can anyone help me I want to search item that display from database with javascript?
Thanks
................
|
|
|
|
|
What server side language are you using?
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
I currently using ASP. Pleas help me
Thanks
................
|
|
|
|
|
Are you using VBScript or JScript with ASP?
---
single minded; short sighted; long gone;
|
|
|
|
|
Am using ASP with VBScript
................
|
|
|
|
|
Hi there,
How can I pass Hyperlink in mail by using php's mail function.
i.e.
$mailId = "abc@xyz.com";
$sub = "Testing of passing Hyperlink";
$body = "a target='_blank' href = 'test.com/Testing.php?action=checkLink'>Link Text"
mail($mailId, $sub, $body);
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
What you need to do is set the Emails Content-type: header to "text/html".
Here is an example:
<font face="Helvetica, Arial, sans-serif"> $message = "<html><body><a href="example.html">Click Here</a></body></html>";
$headers = "MIME-Version: 1.0 \r\n";
$headres .= "Content-type: text/html; <font face="Helvetica, Arial, sans-serif"><big><code><span class="string">charset=iso-8859-1 \r\n</span></code></big></font></font><font face="Helvetica, Arial, sans-serif"><font face="Helvetica, Arial, sans-serif">";
mail("bob@example.com", "Hello", $message, $headers);</font></font>
You can find more at:
http://au3.php.net/manual/en/function.mail.php[^]
Last modified: 15hrs 48mins after originally posted --
Brad
Australian
- peterchen on "Who has the worst keyboard"
Keyboard? Ha! I throw magnets over the RAM chips!
|
|
|
|
|
Hi All,
I need yearwise scroll in asp.net calender control so I took 2 linkbutton << (for prev year) and >> (for next year). On click event of << I wrote code:
calDate.SelectedDate = calDate.SelectedDate.AddYears(-1)
calDate.VisibleDate = calDate.SelectedDate
but its gives error
System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.
The added or subtracted value results in an un-representable DateTime.
Parameter name: months
For >> I wrote this code:
calDate.SelectedDate = calDate.SelectedDate.AddYears(1)
calDate.VisibleDate = calDate.SelectedDate
But here also its not showing next year properly....
the same code work in ASP.NET 1.1(C#) but its not working in ASP.NET 2.0(VB)
please help me.Its very urgent.
Thanks in advance..
|
|
|
|
|
We have ASP.NET2.0 application which is having different report similar to excel format which we create at runtime through JavaScript based on certain user selected criteria by creating a XML Document from values received from server and then assigning the XML document to Div control as innerHTML (This HTML table contains around 24,000 thousand HTML input boxes).
It took around 10-12 sec to render the HTML table to UI and sometimes it even table not get painted on screen but it comes up when user press minimize and maximize button, please suggest us some better ways of rendering the HTML table, attributes need to be used in HTML table to render it fast.
Anil Modest
Lead Engineer
HCL technologies, Noida
Anil Modest
Lead Engineer
HCL technologies, Noida
|
|
|
|
|
I have a div control on my web page which to which i assign a XML document which contains a HTML table as innerHTML, but sometimes table will not get painted on web page.
Although the same get painted when i click on minimize and maximize button, given below is the piece of javascript code i am using for the same
var divFullReport = GetElement("div_FullReport");
divFullReport.innerHTML = '';
divFullReport.innerHTML = xmlFinalStructure.xml;
This client side javascript code get executed when user press client side button on web page.
Anil Modest
Lead Engineer
HCL technologies, Noida
Anil Modest
Lead Engineer
HCL technologies, Noida
|
|
|
|
|
Greetings,
My name is Yasser and I'm developing web site using ASP .NET 2.0, my wb site hosted on Windows Server 2003 / IIS 6 machine...
I'm using redirector in order to make my urls more friendly so if my client writing the following url:
http://www.mysite.com/example
it will redirected to http://www.mysite.com/somepage.aspx?par=p1 ... this techique is working fine so far till i got a problem when i need my friendly url looks like this http://www.mysite.com/someemail@domain.com i want to redirected to another page and take the email as a parameter to the actual page like this: http://www.mysite.com/otherpage.aspx?email=someemail@domain.com ... when i write the rewrite rule for the redirector for that case it never works and have 404 error - page cannot be found ... I guess the IIS server consider the someemal@domain.com resource file on the server with extension .com and of course it doesn't exist so he response with the 404 error ...
and this problem is killing me and i cant reach any work around
is there a possible way to solve this and make IIS server redirect the mentioned url...
sorry for my bad English ... it's not my mother tong
Thanks in advance
Best Regards,
Yasser
Yasser Salama(MCP)
|
|
|
|
|
Hi,
I have created a SOAP web service in .NET. I have a client application which consumes some methods - it essentially passes a username and password to the web service and gets back a 'signature' (for what is not important), once the username and password is correct.
Obviously, this web service is exposed to the world - and could be a target for malicious users, etc. Is there any way in .NET to say "Only allow this application to use this web service"?
I cannot limit the IP range, as the client app should be usable from anywhere. I'm sure this is a common problem, but have found no concrete help.
Thanks,
Cormac
|
|
|
|
|