|
You can set "AllowPaging=True" and "AllowSorting=True".
modified 27-May-14 4:50am.
|
|
|
|
|
iam using visual studio 2005 with ajax controltoolkit library but after design the form during runtime form is displaying blank page , that no controls are displayed.
|
|
|
|
|
there may be issue of the iis so check that one
if not than send you aspx page
|
|
|
|
|
r u using a formview or gridview.. if so then the controls will display only if there is data..unless u specify the emptydatatext..
|
|
|
|
|
Hello
I have one problem.I put one textboxe on my form for searching.I have added one image in left side of textbox using css class.
My problem is:I want to add second image near to first image and when i click on that image,one popup will be displayed which contains all data from database.
i want to do all this procedure in one textbox.
If u have any idea,pls suggest me.
Thanks
|
|
|
|
|
You cannot do it directly.
Use any trick.
Like use div tags (runat=server) containg images and place it on the textbox by setting its position:absolute.
and on the click on div tag write the server side code.
The miracle is this--the more we share, the more we have.
|
|
|
|
|
Hi All
I am facing a challenge regarding URL.
I am generating URL at runtime
'http://mysitename//Pages//Category.aspx?cat=eSOLPublicationCatalogOnNet&category=General exams'
And I am getting an error 'http://mysitename//Pages//Category.aspx?cat=eSOLPublicationCatalogOnNet&category=General exams'
is not a valid virtual path.
Here General exams is having an error .It is showing it is not a valid virtual path.
If i replace blank spaces with %20 in "General exams".Then it is working fine.
Please guide.
Thanks
Regards
Sandeep Kalra
|
|
|
|
|
|
you can use HttpUtility.UrlEncode to add the %20. JimBob SquarePants
*******************************************************************
"He took everything personally, including our royalties!"
David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager
*******************************************************************
|
|
|
|
|
iam using asp.net controls ..at design time it looks good even though iam using tables also but at run time controls are not at the position and they are not arranged in a well manared and they are overlapping the text boxes and labels and dropdownlist controls how to handle this situations
|
|
|
|
|
Use CSS to position your elements I know the language. I've read a book. - _Madmatt
|
|
|
|
|
can u say me what properties i have to set using css .can you give me a simple example for that which helps me.
|
|
|
|
|
You'll find plenty of examples here[^] I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi ,
Is there any free chat tools like we see in Gmail ?Is there any way to implement chat like what we see in gmail ?.Please help me.
With Regards .
|
|
|
|
|
|
I am working with a website where I present a question in a panel and then I submit three alternatives as answers in a checkbox or a radiobuttonlist. I get the information from a database, create webcontrols and then insert them into the panel. Some questions need to randomize the order of the answer alteratives, and that happens when the webcontrol is created. Every time the page is reloaded, the information gets read from the database, the webcontrol is created and put into the panel. This means that i I have like "What is the capital of Sweden?" 1. Stockholm, 2. Oslo, 3. Copenhagen. I have the radiobtn as autopostback, and when I click 1. Stockholm the page reloads, and the next time the alternatives is for example 1. Oslo 2. Copenhagen 3. Stockholm, but Stockholm is still checked and that is good. Thats the way I want it.
Now my problem:
When I do the exact same thing with checkboxlist (I put listItems in the list) the selection in the checkbox doesn't follow the alternative. So if I have 1. Stockholm, 2. Oslo, 3. Copenhagen I click 1. Stockholm, the page reloads, the names order are randomized, but the selection remains. The result could be 1. Oslo, 2. Copenhagen, 3. Stockholm but now Oslo has been selected since the selection doesn't connect to the alternative.
The code for creating the RadioButtonList is exactly the same as the one for CheckBoxList. It works with the radiobuttons, but not with the chekboxes. Why??
|
|
|
|
|
Besa72 wrote:
Stockholm the page reloads, and the next time the alternatives is for example 1. Oslo 2. Copenhagen 3. Stockholm, but Stockholm is still checked and that is good.
just a note, don't you think it would be confusing to the user, that the answer choices change on each post back?
Anyways if u want it like that, it is sure for a reason.
Regarding ur problem, can u show us some code?
|
|
|
|
|
The reason the control postsbacks is just by developing reasons. When it is done it will not work like that. But the finished page will work like that anyway although you wont see it. I will try to explain:
1. When I click the "next question" button the page_load runs again.
2. In the page_load the querysting checks the number of the question
3. the question is loaded from the databse
4. In the database there is a field for random on/off.
5. The checkedlistbox webcontrol object is created.
6. If random - random values are created and put into a list (in this case the list could look liek this: 2, 0, 1)
7. The name of the towns are added into the checkedlistbox as listitems, the order of the listitems is added like this:
for (int i = 0; i < this.LstChkBoxes.Count; i++)
{
myCheckBoxList.Items.Add(new ListItem(this.LstChkBoxes[lstRandom[i]].sText, this.LstChkBoxes[lstRandom[i]].nAlternatives.ToString()));
}
8. The webcontrol is then added into the panel on the webpage, but in a different order than before. In the radiobutton-case the selection is attached to the choice on the second rendering of the page, but not in the checkboxcase.
This is the code that creates the webcontrol CheckBoxList
public override WebControl ToWebControl()
{
myCheckBoxList = new CheckBoxList();
myCheckBoxList.BackColor = ColorTranslator.FromWin32((int)CrBkColor);
myCheckBoxList.Style.Add("Position", "Absolute");
myCheckBoxList.Style["Top"] = ITop.ToString() + "px";
myCheckBoxList.Style["Left"] = ILeft.ToString() + "px";
myCheckBoxList.Style.Add("z-index", this.Order.ToString());
myCheckBoxList.ID = this.checkboxId.ToString();
myCheckBoxList.AutoPostBack = true;
if (this.BRandomShow)
{
Random rand = new Random();
List<int> lstRandom = new List<int>();
while (nmbrsAdded == false)
{
int rnd1 = rand.Next(0, this.LstChkBoxes.Count);
if (!lstRandom.Contains(rnd1))
{
lstRandom.Add(rnd1);
if (lstRandom.Count == this.LstChkBoxes.Count)
nmbrsAdded = true;
}
}
for (int i = 0; i < this.LstChkBoxes.Count; i++)
{
myCheckBoxList.Items.Add(new ListItem(this.LstChkBoxes[lstRandom[i]].sText, this.LstChkBoxes[lstRandom[i]].nAlternatives.ToString()));
}
}
else
{
for (int i = 0; i < this.LstChkBoxes.Count; i++)
{
myCheckBoxList.Items.Add(new ListItem(this.LstChkBoxes[i].sText, this.LstChkBoxes[i].nAlternatives.ToString()));
}
}
if (this.bBorder)
{
myCheckBoxList.BorderStyle = BorderStyle.Solid;
myCheckBoxList.BorderColor = Color.Black;
myCheckBoxList.BorderWidth = Unit.Pixel(2);
}
if ((Lwfont.LocalFontStyle & 1) != 0)
myCheckBoxList.Font.Bold = true;
if ((Lwfont.LocalFontStyle & 2) != 0)
myCheckBoxList.Font.Italic = true;
if ((Lwfont.LocalFontStyle & 4) != 0)
myCheckBoxList.Font.Underline = true;
if ((Lwfont.LocalFontStyle & 8) != 0)
myCheckBoxList.Font.Strikeout = true;
if (this.lwfont.LocalFontName != null)
{
myCheckBoxList.Font.Name = this.Lwfont.LocalFontName.ToString();
myCheckBoxList.Font.Size = lwfont.LocalFontSize;
myCheckBoxList.ForeColor = ColorTranslator.FromWin32((int)Lwfont.LocalFontColor);
}
else
{
Test test = new Test();
test = HttpContext.Current.Session["test"] as Test;
myCheckBoxList.Font.Name = test.SfontName;
myCheckBoxList.ForeColor = ColorTranslator.FromWin32((int)test.IfontColor);
}
int height = this.IBottom - this.ITop;
int width = this.IRight - this.ILeft;
myCheckBoxList.Width = width;
myCheckBoxList.Height = height;
return myCheckBoxList;
}
|
|
|
|
|
hi,
sory for the late reply,
what happens if you set the selected values again, in the for loop where u r adding them?
<pre>
if (this.LstChkBoxes.Items[i].Selected == true)
{
myCheckBoxList.Items.FindByValue(this.LstChkBoxes[i].nAlternatives.ToString()).Selected = true;
}
</pre>
|
|
|
|
|
I don't know how to do that in an easy way. I will simply try another solution and abandon this one...
Thanks anyway
|
|
|
|
|
Are you randomising the text of the Checkboxes or the actual Checkbox objects?
|
|
|
|
|
or you can give me any website demo using asp.net..
|
|
|
|
|
|
|
Hi,
I m currently developing a project on Xml Editor in vb.net...While trying to validate the xml against dtd i m getting the following error :
XmlValidatingReader is obsolete.
I tried using XmlReaderSettings but its showing an error saying that "The XmlSchemaSet on the document is either null or has no schemas in it. Provide schema information before calling Validate."
This is the coding i ve written :
Dim xmlV As New XmlDocument
Dim xmlP As New XmlTextReader(TempFile)
Dim settings As New XmlReaderSettings
Dim eventhandler As ValidationEventHandler
eventhandler = New ValidationEventHandler(AddressOf WriteErrorLog)
xmlV.Validate(eventhandler)
settings.ValidationType = ValidationType.DTD
settings.ProhibitDtd = False
Dim reader As XmlReader
reader = XmlReader.Create(xmlP, settings)
xmlV.Load(reader)
ErrStr = ""
ListBox1.Items.Clear()
IsValid = True
Do
Try
If reader.Read() Then
lineInf = CType(xmlV, IXmlLineInfo)
End If
Catch exx As Exception
Try
IsValid = False
If lineInf.HasLineInfo Then
ErrStr = lineInf.LineNumber.ToString + ": " + lineInf.LinePosition.ToString + " " + exx.Message
End If
If exx.Message.IndexOf("EndElement") > 1 Then
Exit Do
End If
ListBox1.Items.Add(ErrStr)
Catch eeex As Exception
MsgBox("Some unexpected error occurred " + vbNewLine + eeex.Message, MsgBoxStyle.Information, "Error")
Exit Do
End Try
End Try
Loop While Not xmlP.EOF
reader.Close()
xmlP.Close()
Me.Cursor = System.Windows.Forms.Cursors.Default
If IsValid = False Then
MsgBox("File is not valid", MsgBoxStyle.Exclamation, "Error")
Else
MsgBox("File is valid", MsgBoxStyle.Information, "OK")
End If
End Sub
Can anyone pls help me out in finding the error??? THanks in advance.
|
|
|
|