|
sammyl33 wrote: I was able to get one instance to work with the indicator and results but I can't seem to get it to work for multiple progress indicators and results.
Well, you're probably doing something wrong.
...
...
Since you don't describe at all how you're trying to accomplish this task, it's very unlikely anyone here will be able to help you.
|
|
|
|
|
Well, I am trying to do this in C# under .NET Framework 1.1 and on a webform.
Here is what I would like to accomplish...
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="portal.WebForm1" %>
<title>WebForm1
texbox...
button...
datagrid1...
datagrid2...
Here are my questions....
Lets say I have 3 sources (www.google.com, www.yahoo.com, and www.msn.com), they will show up on datagrid1 when the page load like this...
Source Status
www.google.com None
www.yahoo.com None
www.msn.com None
As soon as the user enters a value and click Search, this is how datagrid1 should look
Source Status
www.google.com Searching...
www.yahoo.com Searching...
www.msn.com Searching...
And as soon as one of the Sources return any results or error it will update the Status for that Source accordingly. It will also populate the results in datagrid2 like this...
datagrid1:
Source Status
www.google.com Success
www.yahoo.com Error
www.msn.com Searching...
datagrid2:
Source No. Results
www.google.com 100
www.yahoo.com 0
I hope this makes sense. I search all over but can't seem to find a way to do this. Any help is greatly appreciated.
slam
|
|
|
|
|
IE on Windows XP SP2 shows this yellow bar on the top of the webpage if it has an activex control. I want to show a message on the webpage to the end user to click on the yellow bar and install AX control, but I would like to show the message only if the client OS is Windows XP SP2. Is there a way to detect this from either the http headers, or user agent string, or from the javascript in the web page? I looked at the user agent string, but I dont see anything that tells you it is from Windows XP SP2.
thanks!
|
|
|
|
|
I think you must use JScript, and if you do, the yellow bar will show up because you are trying to access sysinfo. I think you should view the message anyway, as most xp users have sp2.
----
Dim Sleepy as Boolean = True
If Me.Sleepy = True Then
Goto Sleep
End If
----
|
|
|
|
|
After a few evenings of doing tutorials and trying things out, I just encountered my first reallife .NET problem. It concerns dynamic databinding of a Repeater control, using C# and Visual Studio 2005.
For the purpose of binding a number of XML datasources (RSS feeds) to multiple Repeater controls, I made my own implementation of the ITemplate interface :
<br />
public class RssTemplate : ITemplate<br />
{<br />
static int itemcount = 0;<br />
ListItemType templateType;<br />
string title;<br />
<br />
public RssTemplate(ListItemType type)<br />
{<br />
templateType = type;<br />
}<br />
<br />
public RssTemplate(ListItemType type, string t)<br />
{<br />
templateType = type;<br />
title = t;<br />
}<br />
<br />
private void TemplateControl_DataBinding(object sender, System.EventArgs e)<br />
{<br />
Literal lc;<br />
lc = (Literal)sender;<br />
RepeaterItem container = (RepeaterItem)lc.NamingContainer;<br />
lc.Text = "<a href=\""; <br />
lc.Text += XPathBinder.Eval(container.DataItem, "link").ToString();<br />
lc.Text += "\">";<br />
lc.Text += XPathBinder.Eval(container.DataItem, "title").ToString();<br />
lc.Text += "</a><br />";<br />
}<br />
<br />
public void InstantiateIn(System.Web.UI.Control container)<br />
{<br />
Literal lc = new Literal();<br />
switch (templateType)<br />
{<br />
case ListItemType.Header:<br />
lc.Text = "<b>" + title + "</b><br>";<br />
break;<br />
case ListItemType.Item:<br />
lc.DataBinding += new EventHandler(TemplateControl_DataBinding);<br />
break;<br />
case ListItemType.Footer:<br />
lc.Text = "<br />";<br />
break;<br />
}<br />
container.Controls.Add(lc);<br />
itemcount += 1;<br />
}<br />
}<br />
Now I want to loop through a collection of XML urls, fetch the content and bind each dataset to a different Repeater control (see code below). The problem is that the Databind() function, which should bind all datasources to their corresponding controls, binds every control to the first Datasource. I end up having multiple copies of the same RSS items on my page.
I'm sure it's something very trivial I'm overlooking here or it might be that my approach is wrong altogether, but if someone could push me in the right direction here, I would be very grateful.
<br />
OleDbDataReader dtr = cmd.ExecuteReader();<br />
WebFetch wf = new WebFetch();<br />
while (dtr.Read())<br />
{<br />
XmlDataSource xmlds = new XmlDataSource();<br />
xmlds.Data = wf.fetchURL(dtr.GetString(2));<br />
xmlds.XPath = "rss/channel/item";<br />
<br />
Repeater rss_repeater = new Repeater();<br />
rss_repeater.DataSource = xmlds;<br />
rss_repeater.HeaderTemplate = new RssTemplate(ListItemType.Header, dtr.GetString(1));<br />
rss_repeater.FooterTemplate = new RssTemplate(ListItemType.Footer);<br />
rss_repeater.ItemTemplate = new RssTemplate(ListItemType.Item);<br />
RssPlaceHolder.Controls.Add(rss_repeater);<br />
}<br />
dtr.Close();<br />
DataBind();<br />
As stated above : why does DataBind() bind all instances of the Repeater class to the same instance of XMLDataSource, where it should bind (in my opinion) to different instances of XMLDataSource?
-- modified at 4:32 Wednesday 15th February, 2006
|
|
|
|
|
Well, I fixed my own problem by accident, but I can say I was quite surprised by the solution. Not to say that this DataSource class seems to me, coming from a C++ background, rather strangely implemented.
The solution for my problem was : initialize the ID property of the datasource instance and it will be a different instance! I now have different repeater controls bound to different datasources, instead of having them all bound to the single first datasource that I created. So doing
DataSource ds = new DataSource()
doesnt create an instance (yet) with its own address space, but
ds.ID = "some_unique_name";
does!
Anyone else thinks this is rather odd? I mean, just imagine you were me, having worked with OO oriented languages for more than 10 years and coming across this seemingly new approach to class instantiation.
|
|
|
|
|
ASP.NET uses the ID of a control to keep track of it during each postback. The control's ID is used to identify the control's serialized information. Without the ID, ASP.NET won't be able to reconstruct the control on the server side.
|
|
|
|
|
dear friends
I have simple page for enquirey form which contains the code as below
<%
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
dim First_Name,Last_Name,Title,Company,Address1,CmbCountry,ZipCode,cmbEtype,EmailId,Comments,entdate
dim sql_insert
FirstName=ChkString(Request.form("First_Name"))
LastName=ChkString(Request.form("LastName"))
Title=ChkString(Request.form("Title"))
Company=ChkString(Request.form("Company"))
Address1=ChkString(Request.form("Address1"))
CmbCountry=ChkString(Request.form("CmbCountry"))
ZipCode=ChkString(Request.form("ZipCode"))
EmailId=ChkString(Request.form("EmailId"))
cmbEtype=ChkString(Request.form("cmbEtype"))
Comments=ChkString(Request.form("Comments"))
entdate=now()
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open("c:/inetpub/wwwroot/altadawi/Database/AlTadawi.mdb")
set rs = Server.CreateObject("ADODB.recordset")
rs.cursorlocation =3
sql_insert = "insert into EnqDetail (Fname, Lname, Etitle, Ecompany,Address1,Country,ZipCode,EType,emailId,EnqDet,EntryDate) values ('"
sql_insert=sql_insert & FirstName & "', '" & LastName & "', '" & Title & "', '" & Company & "', '" & Address1 & "', '" & CmbCountry & "', '" & ZipCode & "', '" & cmbEtype & "', '" & EmailId & "', '" & Comments & "','" & entdate & "')"
response.write(sql_insert)
rs.Open sql_insert, conn,1,2
rs.close
Set RS = Nothing
conn.close
%>
when I submit this page it gives me error as below
Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/altadawi/EnqSubmit.asp, line 38
Please can u tell me where is the problem in my code.
Your quick response will be highly appreciated.
Thankx
Murtuza Patel
|
|
|
|
|
You haven't given the IUSR_[machinname] account write permission to the database file.
---
b { font-weight: normal; }
|
|
|
|
|
You are using SQL injection! This is not a secure way of creating a SQL command. Also, you are concatenating a date to the SQL command. This is probably causing your error. If you insist upon using SQL injection, you need to convert the date to a string and, in your SQL command, have a SQL function that converts a string to a date. Otherwise, USE PARAMETERS!
-- modified at 19:27 Wednesday 15th February, 2006
|
|
|
|
|
Anyone can give the source code of a UPnP java media server and a media player
|
|
|
|
|
How does PHP compare to Javascript?
Are there any good books or web sites that you can recommend for learning PHP?
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
They don´t...
PHP is server side open source cross platform
Javascript is client side
They have strengths and weaknesses but do mix well.
PHP at version 5 is a mature OOP language and I use it to implement business logic & database patterns over a MySQL database serving pages with embedded Javascript to handle UI patterns (thanks yahoo btw)
A good book? Unusally I think the dummies PHP book is a good place to start (let the flames begin)
Is this the first PHP question on CP
And why am I answering
Hope this helps?
|
|
|
|
|
Thanks for the response.
Dummies books are written to my level of comprehension so I will get a copy.
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Jeremy Thornton wrote: PHP is server side open source cross platform
Javascript is client side
PHP can be used on the client side, although it's an unusual use. JavaScript is used on both server and client side.
Steve
|
|
|
|
|
true, but didnt want over complicate things and as the most popular language of all time Javascript doesn´t need much promotion. So I thought giving PHP(5) a shove in this august site might be fun if a little like shouting into the wind
wikipedia and www.devarticles.com have good info on Javascript for the full story...
php.org has what else you might need too...
|
|
|
|
|
have u know any trick to change any email_id's....
like of yahoo,rediff etc.
|
|
|
|
|
Try wzw.hakzor.con
and yes I did mean con not com!
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Hi, I am currently trying to complete a 90% working Intranet site for my company and the developer left a long time ago.
The site has been developed with ASP.net and C# both of which I'm not familar with but trying to piece my way with my J2EE background.
The main issue I have is that the site was supposedly developed with security features to restrict access to pages / parts of pages based on the users' AD Group Membership.
The developer had the following in the web.config file
<configuration>
....
<appSettings>
<!-- internal security to Active Directory group mapping -->
<!-- all mappings are in the format:
<add key="[internalRole]" value="[Active Directory Security Group]" />
-->
<!-- Standard user groups -->
<add key="iUser" value="OurDomain\Domain Users" />
<add key="iUserIT" value="OutDomain\IT Dept" />
...
<configuration/>
However nowhere in the rest of the application with code or config files can I find any reference to anything such as iUser, iUserIT etc etc.
The config file shows that Windows as opposed to Forms based authorisation is used and I have been searching the web for tutorials and found that "Roles" can be used to restrict access to a particular directory / file by using a construct as follows,
<location path="myPage.aspx">
<system.web>
<authorization>
<allow roles="AdminRole" />
<deny users="*" />
</authorization>
</system.web>
</location>
I have a number of questions :
1) If I can define as above which Role can access each resource, how/where do I define which windows Group pertains to each Role?
2) Is there a simple way of using the Users windows account to look for a particular Group, ie so that I can stick a function at the head of certain pages to allow / deny access to content based on their AD Group membership.
I'm sure this should only be a 4-5 liner but I haven't been able to find anything so far.
Any help would be greatly appreciated,
Damian Del Campo
|
|
|
|
|
can any one tell me the whole procedures as well as
code to make any own web site.
|
|
|
|
|
well if you are able to make a simple html 0r dhtml pages and link them.You are having the code.
for making a website following things must be done on your machine.
1. Install IIS.
2. right click at "my computer" go to manage section.
3. then click on "services and applications" and then right click on "IIS services".
4. You are having a option for making the "website".
5. now follow the instructions.
vivek
|
|
|
|
|
hi,
Can anyone help me in -> how to search a word or text in a web page ? .
I using ASP & Sql Sever 2000.
vivek
|
|
|
|
|
You mean how to search the database?
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
-- modified at 7:39 Tuesday 14th February, 2006
|
|
|
|
|
just simple using SELECT query....
<< >>
|
|
|
|
|
Dear all
I used the method showModalDialog("url") to diaplay a modal dialog box.But i am gettin displayed with both the dialog box and browser window of the specified URL.
I need only dialog box to be displayed.
Please help me to resolve this problem
Daewoo
|
|
|
|