|
After loading an XML file into DataSet; DataSet creates number of DataTable instances so you have to decide which datatable instance you want to use.
For Example,
DataSet ds=new DataSet();
ds.ReadXml(....);
// List of DataTables
for(int i=0;i<ds.tables.count;i++) {
="" messagebox.show(ds.tables[i].tablename);
}=""
<div="" class="ForumSig">A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
Hi,
I have a GridView which is showing a number of records.
Each record can be grouped by a column called "Status" and there are several possible status values, e.g. New, Open, Closed, Deferred, etc.
I've added a drop-down list and a button which allows me to choose one status value to be displayed in the list. I do this by setting the .FilterExpression property on my GridView and this works great. However, now there are loads of records on the system, I really need to be able to apply one or *more* status values to filter the GridView on. So I'd like to be able to choose, say, "New" and "Deferred".
I started off by adding a number of checkboxes, one for each possible status with the idea that I'd read the values and build a suitable filter expression but it's really clumsy looking.
What I'm looking for is a more elegant way of building up my FilterExpression string using checkboxes. Can anyone suggest an approach?
Thanks - and have a great weekend
|
|
|
|
|
Try CheckBoxList
You can iterate through the list and get the text value of each item whose Checked value is True .
Evil cannot be conquered in the world... It can only be resisted within oneself.
|
|
|
|
|
how to handle changepassword button click event in changepassword control.
I didn't get its click event plz help...
|
|
|
|
|
The ChangePassword controls changes the password through the MembershipProvider specified in the web.config.
Look into ChangingPassword and ChangedPassword Events. These events will be fired before and after respectively if you click 'Change Password' button.
|
|
|
|
|
why do you need click event of changepassword control. You can use ChangePassword1_ChangingPassword() event instead.
|
|
|
|
|
Had you configured your web application with WAT - Web application administrative tool?
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
I am providing the user the option of adding image/smiley using FCKeditor.
but in my home page where i want to show only an abstract of the content,
i do not want to show either the image or the smiley that the user could
have added.
so inorder to create an abstract of the content, how to I ignore / filer out
images and smileys?
AT PRESENT, i am using string manipulation to remove substring between
"<img" and="" "="">". Is it the correct approach?
Thanks,
Netquestions
modified on Friday, May 29, 2009 10:55 AM
|
|
|
|
|
Hi all,
I have Dropdownlist1,Textbox1
The items in Dropdownlist1 are
>
<
=
!=
IS
Not
Like
Based on the selection only i need to enter the text in textbox1
i.,e
for > --only numbers
< --only numbers
= --value or Characters
!= --Value or Characters
IS --Null
Like --Characters
how to get all the above....
Regards,
Koti.K
|
|
|
|
|
set attribute ValidateRequest="false" at page directive.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
Hi
After Make the validaterequest="false" at page tag
what i need to write in my page
|
|
|
|
|
katarukoti wrote: validaterequest="false"
This wont make any difference for you
If you want to restrict the values entered into the textbox, use javascript, and additionally you can use a CustomValidator either with a javascript function and/or a server side function to validate the input
Alexei Rodriguez
|
|
|
|
|
No, nothing.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
kanu@adatapost wrote: set attribute ValidateRequest="false" at page directive.
What does this have to do with the question??
Alexei Rodriguez
|
|
|
|
|
i have created multiple uploading at runtime through javascript.
but at the time of upload file it can't find HttpFileCollection's File Request 0.
Thats why i am also getting file count 0.
Here i have attached the code for this one.Kindly help to find out this issue.Thanks.
function AddFileInput()
{
var tdFileInputs = document.getElementById('tdFileInputs');
var id = (new Date()).getTime();
var file = document.createElement('input');
file.setAttribute('id',id);
file.setAttribute('type','file');
tdFileInputs.appendChild(file);
var a = document.createElement('a');
a.setAttribute('id','remove_' + id);
a.innerHTML = "Remove<br>";
a.onclick = RemoveFileInput;
tdFileInputs.appendChild(a);
var lnkAttch = document.getElementById('lnkAttch');
count = count + 1;
if(count>0)
{
lnkAttch.innerHTML = "Attach another file";
document.getElementById("btnSend").style.display="";
}
else
{
document.getElementById("btnSend").style.display="none";
lnkAttch.innerHTML = "Attach a file";
}
}
function RemoveFileInput(e)
{
var Event = e ? e : window.event;
var obj = Event.target ? Event.target : window.event.srcElement;
var tdFileInputs = document.getElementById('tdFileInputs');
var a = document.getElementById(obj.id);
tdFileInputs.removeChild(a);
var fileInputId = obj.id.replace('remove_','');
var fileInput = document.getElementById(fileInputId);
tdFileInputs.removeChild(fileInput);
var lnkAttch = document.getElementById('lnkAttch');
count = count - 1;
if(count>0)
{
lnkAttch.innerHTML = "Attach another file";
document.getElementById("btnSend").style.display="";
}
else
{
lnkAttch.innerHTML = "Attach a file";
document.getElementById("btnSend").style.display="none";
}
}
Attachments:
|
| | | |
| <asp:button id="btnSend" runat="server" text="Upload" onclick="btnSend_Click">
|
|
<asp:label runat="server" id="lblFiles">
|
//code behind code is here...........................
protected void btnSend_Click(object sender, EventArgs e)
{
lblFiles.Text = "";
//Note: Here i can't get files..............................
HttpFileCollection files = Request.Files;
for (int i = 0; i < files.Count; i++)
{
HttpPostedFile file = files[i];
if (file.ContentLength > 0)
{
//You can perform uploading here
lblFiles.Text += " " + String.Format("File : {0} uploaded.", file.FileName);
}
}
}
|
|
|
|
|
I would like to Read but i think i will go blind with the scattered code you have posted. but your code inside the pre tag so that it will be formatted nicely.
e.g
int i = 0;
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi all,
At computer A, I have a simple web service which will generate folder "Example" in drive D. I also registered web page (default.aspx) using this web service with IIS.
At computer B, i call web page using: http://ip/default.aspx and click button to generate folder "Example" in drive D.
That i want is folder "Example" must be generated in drive D at computer B, not computer A. How can i do that if it is possible? or how can i download service code from server side to run at client side?
Regard,
|
|
|
|
|
Misperception WebService. Web service is a techonology that provides an interface for some functionality to make it accessible from other programs across the web. This functionality might be obtaining data from a database, performing mathematical calc., etc.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
i wonder if there is a way to solve my problem.
Thanks anyway!
|
|
|
|
|
The code in your web service will be executed at server side only. It will not be executed at client side. Therefore you cannot use your web service to create folder in computer B(client).
You can create folder using FileSystemObject in ActiveXObject with JavaScipt.
But the security permission of the browser should allow ActiveX object to achive this.
Check this link[^].
|
|
|
|
|
If this is all internal network, and each client pc have a shared drive, and ignoring security constraints, i would pass the network path to the webservice so that the code will create the folder in the path provided as parameter.
Again, ignoring all security constraints...
|
|
|
|
|
In my form, I have two gridviews. The left one is binded automatically on the click of a button and both the gridviews are having checkboxes.
While selecting the checkbox on first row, that row should be added to the right gridview. when clicking on 2nd row checkbox, second should be added and likewise. This is possible on the click of a button. But I don't want a button click.
How should I do this on the oncheckchange of the checkbox in gridview? I googled it for sometime, but didn't get much help. Can anybody have any idea please?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Basically, GridView and other controls represent the view not data. Data is placed in your simple or complex variables (say objects). It is better practice to work on objects where data is available.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
Add a ASP.NET checkbox in a Template column as below:
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true" oncheckedchanged="CheckBox1_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
You can get the reference to the GridView row pertaining to the CheckBox clicked using the NamingContainer property
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
CheckBox chk = sender as CheckBox;
GridViewRow gvRow = chk.NamingContainer as GridViewRow;
//You can get the cell values by gvRow.Cells[1].Text
}
|
|
|
|
|
Dear Experts,
I made crystal report which is displaying one main report and then more than ten sub reports.When i login particular user report displaying as proper.
When i login another user, report showing following error. Sp and tables and databases are all same. Sp also returns some data.when i manually run the crystal report in outside of the .net solution problem doesnt occured.
I had verified database also.
Failed to open a rowset.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: CrystalDecisions.CrystalReports.Engine.InternalException: Failed to open a rowset.
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.
How to resolve this issue. Any body known please help me.
Thanx & Regards
Mani
|
|
|
|