|
Your code seema right,But you can do one thing assaign the clientID in newe javascript variable as the same way you did.then pass the variable in document.getElementById().Check viewsource.
Cheers!!
Brij
|
|
|
|
|
Hi All
I need to populate a grid view control in vb.net using a Sql Server 2000 and a basic select sql query.
The interesting part comes from when I need information that is only available on a Oracle database.
Is there any way to populate the control with a single query where I join a sql table with a oracle one?
SqlDataSource1.SelectCommandType = SqlDataSourceCommandType.Text
SqlDataSource1.ConnectionString = System.configuration.ConfigurationManager.ConnectionStrings("REXSConnectionString").ConnectionString
SqlDataSource1.SelectCommand = SqlSelect + SqlWhere + GenerateStatusFilter() + SqlOrderby
GridView1.DataBind()
as you can see the sqlstatement is dynamic, would it be possible to
add a join to the oracle such as
select collist...
from sqltable sql join oracleservername.database.table oracle
on sql.col = oracle.col ?
or any other ideas?
thx
|
|
|
|
|
Member 3895252 wrote: Is there any way to populate the control with a single query where I join a sql table with a oracle one?
What do you think? If there is a way to perform a join query on those two databases don't you think you can use the results as the DataSource for the Grid? So really what is your question? And don't you think you should ask it in the SQL and Database forum?
led mike
|
|
|
|
|
What do you think?
* I don't know, which is why I am asking the question.
If there is a way to perform a join query on those two databases don't you think you can use the results as the DataSource for the Grid?
* Again, I don't know, which is why I am asking the question.
But it's not really a sql database question it's a question on how to populate a gridview question using 2 separate datasources.
It's sort of a mott point which is the best forum to place the question in.
This question could go in several areas,
Since it's database related, maybe in the database forum,
since it's a asp.net web application perhaps the asp.net forum
since I am using vb, perhaps that forum
Since I am using ado and odbc perhaps I should put the questions in those.
Since I am using a computer maybe the hardware forum.
Sheesh,
|
|
|
|
|
Member 3895252 wrote: But it's not really a sql database question
The way you asked it, it is. You asked if you can join the two databases for use in a single query.
Member 3895252 wrote: with a single query
led mike
|
|
|
|
|
You have two options as I see it.
1) Use a DataSet. Create a connection to each Db (oracle and sql server) and use a dataadapter to add the data you need from each database to the same dataset. Then join the DataTable objects by creating a DataRelation object. Then filter the results on one of the tables (Select, Find or use DataView) and then you can use the datarelation to navigate between the tables on a row-by-row basis(OnRowDataBound).
2) From SQL Server create a linked server reference to the Oracle server (there may be a way to to the inverse of this as well, but I've never worked with Oracle so I don't know). See this reference: http://www.sqlmag.com/Article/ArticleID/49687/sql_server_49687.html[^]. Once that's setup, you can query the two databases from a single select statement.
|
|
|
|
|
there is no problem to open more than one databases.
Use Interfaces for command object, Adapters etc, means use
IDBConnection consql=new SQLConnection();
IDBConnection conorcl=new OracleConnection();
Actually that is not required totally, but it is a good practice. Now fill the database tables to the same dataset, and then do joining in Dataset.
and then show the final resultant in the Grid.
Abhishek Sur
|
|
|
|
|
hi everyone,
I've just started working in DNN and I need to open another ascx control in the same module. After some googling I came to know that there r two methods for that
1)NavigateURL
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL("showrankedresults"), False)
2) LoadControl Method.
Dim objModule As Entities.Modules.PortalModuleBase = Nothing
objModule = CType(LoadControl("~/DesktopModules/RankedSearch/ShowRankedResult.ascx"), Entities.Modules.PortalModuleBase)
objModule.ModuleConfiguration = ModuleConfiguration
Controls.Add(objModule)
When I run it with the navigateURL, it goes to the next module. but doesn't show anything. I just have a "hi" written in the next module though
When I use the LoadControl method, the control gets loaded under the existing control but that's not what I want. I want it to be loaded as if a new page is loaded,
Please help me in this regard
Thanks in Advance
|
|
|
|
|
I have been trying to do a url rewrite in my web application. I implement the Application_BeginRequest function in the Global.asax file.
This part works
context.RewritePath("form.aspx?submission=" + value, false);
however, the requests that follow use form.aspx as the base url still. For examples, when the browser request css files or images
"http://www.site.com/form.aspx/css/date_input.css"
I'd like the urls to resolve normally
"http://www.site.com/css/date_input.css"
I thought if I called rewritepath(string,boolean) with false for the boolean that it would prevent maintain the original url base.
I'm using .net 3.5, visual studio 2008
<code>
protected void Application_BeginRequest(object sender, EventArgs e) {
HttpContext context = HttpContext.Current;
string originalPath = context.Request.Url.ToString();
int index = originalPath.IndexOf("/form.aspx/");
if (index > -1) {
index = originalPath.LastIndexOf('/');
string data = originalPath.Substring(index + 1);
int value = Utils.decryptID(data);
context.RewritePath("form.aspx?submission=" + value, false);
}
}</code>
Help please
|
|
|
|
|
What does the the css reference look like in your source code before the page is parsed (ie. not from the web browser)? If you are referencing your css/image files like this:
<br />
css/date_input.css<br />
Then that is most likely your problem. Instead use one of the following formats:
<br />
/css/date_input.css<br />
Note the "/" at the beginning referencing the web root.
<br />
~/css/date_input.css <br />
Unless you are passing this format to Response.Redirect() or to a server control attribute, this format requires the reference to be parsed by Page.ResolveClientUrl(). This method is useful when you are using the VS debugger or IIS on Vista/XP where your site root is different on localhost than your website's server. For example;
<br />
standard html link element<br />
<link rel="stylesheet" href="<%=ResolveClientURL("~/css/date_input.css")%>" /><br />
<br />
server control<br />
<asp:image id="myImage" runat="server" imageurl="~/images/myimage.jpg" xmlns:asp="#unknown" /><br />
|
|
|
|
|
this is what my css ref looks like. it lives in my master page
<link href="~/css/date_input.css" rel="stylesheet" type="text/css" />
this doesn't work
<link rel="stylesheet" href="<%=ResolveClientURL("~/css/date_input.css")%>" />
modified on Tuesday, August 26, 2008 1:55 PM
|
|
|
|
|
I'd run into the issue before but we were using a custom page class for templating and I forgot we had our own way of rendering the resource path. Here's a blog post about the issue and how to fix it: http://weblogs.asp.net/jezell/archive/2004/03/15/90045.aspx[^]. Sorry for the initial misdirection, but now that I can see what you're doing I was able to find the solution.
|
|
|
|
|
Thank you 
|
|
|
|
|
I have a web page with a table with in a scroll pane that lists a selection of data from a database. They can set different parameters to filter the results shown. via a series of pop up selections like a calendar to set the date and so on. Then they can click a button to refresh the results in the table.
Obviously I want to check to make sure that the values they have selected are in the correct format so i added this code to the button that they press to do the update. The problem was that it was updating the whole page and reseting the textboxes to their default values. I then added an ajax update panel and script manager and the panel holds the table where the results are displayed so it only updates this on the screen. The problem now is that it ignores the validation.
Thank you in advance
"When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson
|
|
|
|
|
lose the AJAX, do validation on the client side, in javascript, and use a !IsPostback block to stop your code from resetting the values on every postback.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
ditched the ajax and added the !IsPostBack but it is still resetting all the text boxes to their default values. I think i've found out why in that i'm using javscript to get a value from a popup window and everytime the button to refresh the table is pressed it goes through the javascript functions.
Thanks for the help
"When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson
|
|
|
|
|
I could succesufully migrate from ASP.Net 1.1 web application project to ASP.Net 2.0 Wep Application Project but, I am unable to over come one error of xsd files.
for One xsd file of ASP.Net 1.1 its(2.0) creating 5 Files( .cs,.designer.cs,xsc,xss and xsx), and I'm ending up with an Error
'Namespace.task.dsTargetsForIISMetabase' already contains a definition for 'targetRowChangeEventHandler' E:\Sampleapp\dsTargetsForIISMetabase.Designer.cs
Please suggest me how should I over come XSD Problem after Migration.
Thanks,
Pashi
|
|
|
|
|
I have already added the web reference.
I get this error when I try to access a web service method from my c# windows application.
"The request failed with HTTP status 401: Unauthorized."
Any ideas please?
|
|
|
|
|
If you are able to debug to the point of seeing the exception you will see that the inner exception reads something like The server has actively rejected your connection.
In the case of the web service it is an indication that the service is not started.
If you server and client are in the same solution, try going into the Solution and marking the project as having two startup projects: your client project AND your webservice project
|
|
|
|
|
Hi,
My grid is loaded like this:
private void LoadCommunication()
{
int _ClientId = Int32.Parse(Request.QueryString["ClientId"]);
List<Communication> communications = CommunicationManager.QueryCommunicationsByClientId(_ClientId);
rgCommunications.DataSource = communications;
rgCommunications.DataBind();
}
In each Communication class there is a reference to the Title class. So if I need to access the TitleID property, then it would be something like:
Communication.Title.TitleID
The object datasource in my .aspx file to load the titles looks like:
<asp:ObjectDataSource
ID="odsTitles"
TypeName="Nedbank.Excon.Lookup.TitleManager"
SelectMethod="GetTitles"
runat="server>
</asp:ObjectDataSource>
I know that my error is here in my drop down:
SelectedValue='<%# Bind("Titles") %>'
..but I do not know how to fix it, or make it work. There is no Titles property. I'm assuming they are looking for the Title.TitleID? This does not work in Bind("Title.TitleID"). I did read the sample applications.
Please can someone advise..
Thanks
Brendan
|
|
|
|
|
either Communication.Title.TitleID or Title.TitleID should work
|
|
|
|
|
Hi,
I'm very new to crystal reports. Now I'm converting a classic ASP application to ASP.NET 2.0 and I already have the rpt files from this asp app.
I create a web content form, and my master page have different menus, which when clicked I pass the report to be opened in Query string. I check this in my report viewer web page and bind it dynamically.
Now when I click next, previous or other buttons in Toolbar, the entire viewer vanishes in to thin air! It just disappears! Do I need to do any custom coding for these navigation feature to work? But then it was working fine in ASP application, and I'm using the same rpt files here
Regards,
Blumen
|
|
|
|
|
I found the answer!
I have to Bind the report again, again and again... i.e. I had called the Bind method in !IsPostBack, but I have to call the method on both PostBack and when the page loads for the first time. Chris Love's blog helped me:
http://professionalaspnet.com/archive/2006/01/15/Crystal1.aspx[^]
But isn't fetching data on every click? Anyway, I've one more doubt:
When I accessed this ASP application and tried to view reports, it asked me with which application to open this file (rpt file). I found out that this was because I dint have viewer installed in my machine. Will the same issue happen to users when I deploy this .NET app in our web server? Or wil they be able to view reports in their browser?
Regards,
Blumen
|
|
|
|
|
Hi
include the Crystal reports Merge module in the web deployment set up file and the Reports will work well on any web server you install on
Mohammad Al Hoss
|
|
|
|
|
Mohammad Al Hoss wrote: include the Crystal reports Merge module in the web deployment set up file
How do I do that?
And normally we don't use setup file for installation, we publish the project to a folder, copy its contents and put it in the virtual directory in the production server.
Regards,
Blumen
|
|
|
|