|
my mail id is imranafsari@gmail.com.
i have defined connection string in web-Config as
connectionStrings
add name="connstr" providerName="System.Data.SqlClient" connectionString="server=local;database=HFSERVICES;uid=sa;pwd=;"
/connectionStrings
Now i want to access this connection string in Default.aspx.cs
Thanks
-- modified at 1:52 Tuesday 5th December, 2006
-- modified at 1:54 Tuesday 5th December, 2006
regards
imran khan
|
|
|
|
|
|
Hi
How to pass argument from server side to javascript function?
Like
Dim index1 As Integer
index1 = index + 1
'index = e.Item.DataSetIndex()
CType(btn, HtmlInputButton).Attributes.Add("onclick", "mybtn(index1);")
this is my server side code and mybtn is my javascript function.
I want to pass index1 which is my variable as argument in my function.
How to do that?
Thanks
monika
|
|
|
|
|
You can't pass a server side variable as a parameter to a client side script. The server variable and the client script never exist at the same time, and never at the same place.
You have to use the value of the variable and put that in the string:
"mybtn(" & index1.ToString() & ");"
---
b { font-weight: normal; }
|
|
|
|
|
hi,
in <HTML> code of design view.
use the document.getElementById( 'server-control id') to fetch the server-controls value.
if you find out someother way. please let me know also.
thanks,
Kapil Thakur
(Where's there is Kapil , there is a way) - thakur.kapil@gmail.com
|
|
|
|
|
hi
thanks for yr kind response.
But yr logic is not possible in my logic.
I have found anothere solution
CType(btn, HtmlInputButton).Attributes.Add("onclick", "mybtn(" & index1.ToString() & ");")
I hope u r getting.
Thanks
monika
|
|
|
|
|
Invalid postback or callback argument. Event validation is enabled using <pages enableeventvalidation="true"> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I got this Error when I clicked Button in Repeater control.
I defined <pages enableeventvalidation="false"> in Web.Config And Machine.Config files Still the error is there.
Polease guide.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
This error is common in ASP.NET 2.0 as by default the EnableEventValidation is set to true for all the web pages. This provides an enhanced security mechanism where each of the event used in a web page must be registered prior to execution. Where ever you are using AJAX or non-registered CallBack methods, ensure to disable this "EnableEventValidation=false". Now you can work freely.
Arun
|
|
|
|
|
I want to show on Column called Sr No in my datagrid. At runtim this column will show values like 1,2,3.... for each selected row based on the records available in dataset. How to acheive this!!!!!!!
Thanks,
Mini Thomas
|
|
|
|
|
you can create an Autoincrement column and seed by 1 and bind with sr. no column.
Be
Bye
|
|
|
|
|
hi,
here is the code to display Sr No. in datagrid. In the following code loadDs is dataset.
if (loadDs.Tables.Count > 0)
{
loadConsultant.Tables[0].Columns.Add(new DataColumn("Sl_NO", System.Type.GetType("System.String")));
foreach (DataTable table in loadConsultant.Tables)
{
int i = 1;
foreach (DataRow row in table.Rows)
{
foreach (DataColumn column in table.Columns)
{
row["Sl_NO"] = i.ToString();
}
i = i + 1;
}
}
}
Regards,
Prya
|
|
|
|
|
Hello Prya,
In ur code how do I bind the row with Datagrid
also there is error on line
foreach (DataColumn column in table.Columns)
{
can u help mi out
Thanks,
Mini Thomas
|
|
|
|
|
hi,
Use the autoincrement column as told by arvind rather than looping through the dataset.
using autoiuncrement column is more efficient than going through loops.
thanks,
Kapil Thakur
(Where's there is Kapil , there is a way)
|
|
|
|
|
Hi!!!
Thanks for attending at my cuestion.
My cuestion is that simple: ¿How can I use CSS with a Multiview Control and some View control within?
It mightbe silly, but I can´t do that. I've googling for a time now and I've founded some examples that apply CSS to make a "tab control" using a Menu control, a Multiview control and view controls, but not interest in that, just in using the CSS with the Multiview and the view.
Greattings, any advice is welcome...
The limits of my language are the limits of my mind
|
|
|
|
|
Hi,
I have got the following problem, maybe one of you guys already ran into it and knows the answer:
I have a Formview bound to a ObjectDataSource for my class [Product]. It contains a Checkboxlist, bound to another ObjectDataSource which gets its Items from my class' [Category] SelectAll() method.
Now every [Product] instance belongs to n categories (Product holds an IList with [Category] instances), and I need to bind them to the CheckboxList's Checked state.
Unfortunately via DataBinding I can only access the SelectedValue (or SelectedIndex) field, which allows only for a single value and can select only one field.
I cannot reach the CheckBoxList via code because evey control within a FormView seems to be completely out of reach. There aren't any visible instances (there is no protected CheckBoxList CheckBoxListCategories anywhere).
So I am completely lost. I hope somebody can help me out of here
--
Jan
|
|
|
|
|
What you want to do exactly i did not got.
If you want to access the checkboxgroup in the formview try
CheckBoxList chkGroup = objFrm.FindControl("objChkGroup") as CheckBoxList ;
and iterate through it.
int index=0;
for(index =0 ; index < chkGroup.Count ; index++)
{
}
I hope this is your problem
|
|
|
|
|
hi friends
how to create the bar chart from database dynamically in asp.net
thanx
regards
saravanan
|
|
|
|
|
|
hi
when i try to use Reporting Services to render a report from aspx page
(web app) (vb.net) by using ReportingServices.dll referennces
i get this erorr :
==================
System.Web.Services.Protocols.SoapException: The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.RSException .
note:
=====
i have windows 2003 - sql 2000 sp3 - Reporting Services sp2
i am login as administrator
pls tell me what i can do ?
thank you all
mr nsr
|
|
|
|
|
Do you have permission on reporting server? Can you browse to the reporting service web service? To test this paste the URI you are using to connect to the web service into a browser.
You said: "using ReportingServices.dll referennces ". You added reporting services as a web reference to your application?
Maybe also post the code where the error occurs.
Also check out the MSDN forum on reporting services
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=82&SiteID=1[^]
|
|
|
|
|
I am working on a web-page in ASP.NET c# that searches the values from the database as per the search criteria and then display the results on the datagrid...This operation takes a while...
Can anyone guide me on how to show up a simple progress bar on the screen until the background database operation is completed...
Thanks
Joe
JO
|
|
|
|
|
I've been going round in circles all day with this.
I'm using a 3rd party library that generates some data and sends it to the http response.
The method signature is
<br />
void ALibrary.WriteTo(HttpResponse Response)<br />
and I would use it like:
<br />
ALibrary myLibraryInstance = new ALibrary();<br />
...
myLibraryInstance.WriteTo(Page.Response);<br />
and it replaces the standard html with its custom response data.
This is great when I want to output the result to a file for download (e.g. PDF, DOC, XLS), but I also want to capture that file to stick it into a blob field in a database.
How do I create a dummy response object and capture the data to a byte array rather than returning it to the browser?
Thanks in advance.
ChrisB
|
|
|
|
|
One of our clients wishes to view company MS Excel reports through their corporate intranet so to accomodate this, I'm referencing the "Microsoft Office 11 Object Library" DLL in vs2005. Through this DLL, I can create any ms excel report I wish. One of my co-workers however, strongly believes generating ms excel reports by using a copy of ms office on the server is a bad idea, however, up to this point, I've been unable to find any bugs in my sample application.
So my question is, are there any serious downsides to generating ms excel reports on the web this way?
The only problem I've come up with so far is the fact that ms office is not a multi-threaded application. Meaning I had to setup some code so that if one user is currently generating a report, a 2nd user cannot begin their report generation until the 1st user is finished.
Other than that though, I haven't had any problems however this is going to be a very involved application (they use 57 different excel reports) so I don't want to spend the next month developing an app using this process only to find out it was the wrong approach to take.
Thanks.
-Goalie35
|
|
|
|
|
|
Thanks for the link indianet. After reading that article, I'll definately be avoiding server-side excel automation.
Can anyone then recomend an alternative to this problem? Creating a CSV file isn't really an option because the reports this company uses contain tabs, background colors, a few pivottables, and an image or two. Our current backup plan is to use Crystal reports which can be exported in xls format however there are a ton of headaches associated with this approach also such as the ability to properly align all of the cells and how to create tabs.
Thanks again.
-Goalie35
|
|
|
|