|
Not sure if this is the right place exactly, but here goes...
We've coded up a component in the form of a .Net user control, embedded into IE. The control itself is to do with updating some stuff on the client machine.
During development, I managed to set up code groups etc using the Framework 2.0 config tool (which uses Caspol.exe behind the scenes). Basically, I set up a child group to the Local Intranet group under the Machine node, and alles ist gut at they say in Hamburg
Can you guess what's next? Precisely - moved to an external webserver, and despite setting up the codee groups "correctly", I'm not getting the control rendered to the page.
I've tried several approaches - Child group of the Internet zone, Top level group itself, Machine level, User level etc, but can't seem to find any combination of settings that works from the internet (Tried URL evidence and strong name evidence)
Anyone been able to set something like this up in the past, and if so, how the funk did you manage it hehe?
C# has already designed away most of the tedium of C++.
|
|
|
|
|
I have a small problem that i can't figure out:
I have a for loop that looks something like the:
for i=0 to rs.rows.count - 1
sqlstring = "Select * From [User] Where Age=" & i &"
rs2.open sqlstring, conn
for each x in rs2
Height = Height + rs.rows(x).items("Height")
next
'This is the part i'm having now i need to divide the height by the total number of rows this will hopefully give me the average height for people in that age group. This will then be inserted into a new Table with all the average heights.
Next
If anyone can see where I'm going wrong please can you help. Any advice is most appreciated.
|
|
|
|
|
Oh god, you couldnt do this a worse way if you tried!
if you have a table called users with columns
<br />
Age INT<br />
Height FLOAT<br />
and you want to know the average height of 10 year old users you can do this with one query:
select AVG(Height) AS AverageHeight from Users WHERE Age=10
|
|
|
|
|
This is exactly the code:
Dim oR1, SQL1
Dim oR2, SQL2
Dim XML
Set oR1 = Server.CreateObject("ADODB.Recordset")
Set oR2 = Server.CreateObject("ADODB.Recordset")
XML = "<graph caption="Output report" subcaption="By Quantity" decimalprecision="0" xaxisname="Age" yaxisname=" Height">"
SQL1 = "Select * From [User]"
Set oR1 = oConn.Execute(SQL1)
For i=1 to 100
SQL2 = "select AVG(Height) As AVGHeight, Age from [User] Where Age=" & i & "Group By Age"
Set oR2 = oConn.Execute(SQL2)
While Not oR2.Eof
XML = XML & "<set name="" & or2("Age") & "" value="" & or2("AVGHeight") & "" />"
oR2.MoveNext
Wend
Next
XML = XML & "</graph>"
But when I run this it gives me this error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that does not include the specified expression 'Age' as part of an aggregate function.
|
|
|
|
|
It looks as though you've not put a space before Group by, so the string would seem to be select AVG(Height) as AVGHeight, Age from [User] Where Age=1Group By Age in the first iteration. Put a space in there and see what happens.
|
|
|
|
|
I want to get the gridview's specified column highlighted onmouseover as well as the row. Can somebody help ?
Kavita
|
|
|
|
|
Read this post on the asp Forum:
http://forums.asp.net/p/1074580/1576884.aspx#1576884
|
|
|
|
|
In the rowCreated event, You can add and attribute to that cell.
Example:
e.Row.Cells(8).Attributes.Add("onMouseOver", "alert('do something')")
|
|
|
|
|
Hi,
Thanks for the reply.
But this does not solve the problem.
It will highlight only one cell, I want to highlight the whole column on mouseover.
For Eg: If I take the mouse on one cell of 2nd column then the complete column 2 should get highlighted and the corresponding row too.
Kavita
|
|
|
|
|
Use Onrowdatabound event and write the code inside
e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.textDecoration='underline';";
|
|
|
|
|
Hi
Iam adding an HTML DIV to an ASPX page dynamically using HTMLGenericcontrol class. After every addition of div to the page, i wanted to add some spaces EX: so that the page should show the content aligned in a format with spaces between two Divs.
Any help on this is appreciated.
Thanks!
Santhosh Kumar Edukulla
|
|
|
|
|
I have a gridView with has a textbox in each row. When I click my adjust button I add up all the textboxes and if they don't equal 1 I set a bolean and show a alert message. This works when the page does a full postback but when I throw a updatePanel around my grid and set up triggers its doesn't and gives me a unexpected javaScript Error.
Any help will be appreciated.
Here's a snippet.
Protected Sub btnAdjust_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdjust.Click
'Validate that the yield are 1
YieldValidation()
If BolValid = False Then
ScriptManager.RegisterStartupScript(Me.Page, Me.GetType, "alert", "alert('Yields must equal 1. Your total is " & yieldTotal & ".')", True)
'Page.ClientScript.RegisterClientScriptBlock(Page.GetType, "alert", "alert('Yields must equal 1. Your total is " & yieldTotal & ".')", True)
End If
End Sub
|
|
|
|
|
I fixed it. It was a BONEHEAD mistake that took hours for a simple placing of the update panel in the wrong position! DOHH
|
|
|
|
|
I would like to build an insurance portal like www.bimaonline.com.
For that I want to know other site[insurance provider] data dynamically.
How could we can access other site data with permission.
Any suggestion would be greatly appreciable!!
Thanks & Regards,
Suman
|
|
|
|
|
Hi,
How can I create ASPX pages on the fly ?
I know that this can be done using Reflection, but can any body point me to a good sample ?
Also, what should I consider if I have to deploy these pages to some server ?
What would you advice me for serializing these pages ? Flat ASPX files or assemblies (DLL) ?
Hope for the best suggestions.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I actually solved this problem earlier.
My solution worked because I used the same C# code file on each of the aspx pages. I'm sure it could be done otherwise, but it was easy to do that way.
What I did was create a base aspx file that had all the things the aspx file would need with a specific comment where the changing data would be.
I then used a streamreader and streamwriter to go through the two files. When the file got to the comment it would then use a different stream reader for that sections contents, and then continue to read the rest of the base ifle.
There might be an easier solution, but this worked fine for me.
-ken
|
|
|
|
|
Hi
I am working on a portal which is exactly the same as this one like a discussion forum internal to our org you can say. Here i have a requirement where users internal to our org will use it.
When the user connect to our portal, we want to show on the page a welcome message EX: " Welcome Santhosh..."
I suppose this information is fetched from AD. Can we have a code with similar requirements written for any of you. I have to do it, but i have very little time frame and it is the added requirement at the end.
You may want to share the code if it is ok with any of you.
Thanks in Advance!
Santhosh
Santhosh Kumar Edukulla
|
|
|
|
|
hello
i had made a crystal report and want it to add into my page when i add it int the table it work proper but when i keep compiling the website it added Style sheet refrence in to my Source. and when i put any other control into table the crystal report is shown in proper....
wasim khan
|
|
|
|
|
Is there any way to access the System.EventArgs of a Click event from the Page_Load event?
My problem is as follows: I have a page which is constructed of usercontrols (ascx), so I have a menu usercontrol, another navigation control and a main content control.
The problem is when I click on a menu item (in order to navigate to another page), the Page_Load event is fired for every usercontrol in the page before the ItemClick event is fired for the menu control, and as a result the main content page loads again, and only after that when the click event fires, the user is redirected to a new page. This basically introduces an unnecessary processing of the page I'm navigation away from.
I have hacked my way by interpreting who has postbacked the page in the Page_Load of the menu control, but I need access to the EventArgs of that method.
I've managed to get the ID of the element sent as event argument using Page.Request.Params["__EVENTARGUMENT"] but I need the whole object.
Any ideas?
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
Hope this will help you to solve your problem.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Thanks, but I don't see how ViewState could help me. I'm not trying to persist a state. I just want to get a reference to the EventArgs of processing events (Click in my case), from the Page_Load method (which fires before the processing events).
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
Ok i will try to work it out your problem and get back to you in few minutes.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
The event arguments for the event doesn't exist when the Page_Load method is run. They are created when the event handler for the click event is called.
What data from the event arguments is it that you need?
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
The menu is a Telerik usercontrol called radMenu. The items of the menu are objects that contain different properties (on the serverside) and are rendered as tables after the page loads.
When clicking on a menu item a Javascript like __doPostBack(telerikControlID,itemID) is called.
where itemID is the ID of the table that contains the items. What I need to access is a property of that menu item clicked. The itemID isn't helping me and the needed property is not rendred in the page. So I need to somehow recreate the objects based on their IDs like the framework does.
Do you have any idea how I could do that?
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
OleDbDataAdapter Adapter = new OleDbDataAdapter(" SELECT Flight_ID from FlightMaster where DateOfFlight='" + Date() + "' Order By Flight_No", aConnection);
DataSet dst = new DataSet();
Adapter.Fill(dst, "Flight");
for ( i = 0; i < dst.Tables[0].Rows.Count; i++)
{
string flightid = dst.Tables[0].Rows[i].ItemArray[0].ToString();
OleDbDataAdapter Adapter1 = new OleDbDataAdapter(" SELECT Count(BagTag) AS bag1 FROM baggageMaster WHERE Flight_ID=" + flightid + "", aConnection);
DataSet dst1 = new DataSet();
Adapter1.Fill(dst1,"BaggaeMaster");
OleDbDataAdapter Adapter2 = new OleDbDataAdapter(" SELECT Count(BagTag) As bag2 FROM baggageStatus WHERE Flight_ID=" + flightid + "", aConnection);
DataSet dst2 = new DataSet();
Adapter2.Fill(dst2);
allflightGV.DataSource = dst1 + dst2;
allflightGV.DataBind();
}
The code is some like that. 1st dataset will give some values suppose 10 and for loop will run from 0 to 10 . now 2nd and 3rd dataset will give 2 values each time till loop end. I want to insert that 2 values in each row of Gridview. I know this code is not proper . Plz can any one provide me solution to this problem . Thanks to all there .
hi
|
|
|
|