|
Dreamweaver is the web development tool i use, so I guess I should be using php. But from what I heard php and asp.net are similar. I'm more comfortable with the .net suite and I was wondering because of that, should I start doing dhtml in there, or keep with dreamweaver. I mean php can't be that hard, just which one is better overall?
|
|
|
|
|
|
I have a composite server control and I create some dynamic controls in it, like so:
public class MyControl : CompositeControl
{
private Panel panel;
protected override void CreateChildControls()
{
Controls.Clear();
panel = new Panel();
panel.ID = "Panel1";
panel.SkinID = "Panel1"
Controls.Add(panel);
}
protected override void Render(HtmlTextWriter writer)
{
panel.RenderControl(writer);
}
}
The said server control is placed on a page which uses a stylesheet theme, which has a skin file containing a declaration for a Panel skin, like so:
<asp:Panel SkinID="Panel1" runat="server" BackImageUrl="top-panel.gif"></asp:Panel>
However, the skin is never applied... Am I missing something or doing something wrong? Perhaps CreateChildControls override is a bad place to do that?
|
|
|
|
|
Hi all
Im trying to use google base file for my web site,i thought to put a schedule for that file,(which provide by google base feed),so i created the DTS for this everytime error as "Failed" and "We didnt understand ur delimeters" ,so what is the best way to create google base class,and is there and example to this pls give me help.
Thanks,
|
|
|
|
|
Hi:
Can any one tell me how to convert Dataview into datatable on Dotnet2003.
Thanks
suresh
|
|
|
|
|
DataTable dt = theDataView.Table
|
|
|
|
|
hi i would like to know is it possible that i use apachi webserver for asp.net application?
and necessary to install .net framework?
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
You need IIS for an asp.net webiste I think
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
|
I can only find 3rd party controls.
Any help would be great
thanks
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Ive got an Onclick event which has the following code in:
ViewState["items"] = lb1.SelectedItem.Value;
Response.Redirect("Page.aspx?sql=items");
on the pageload it should then display the values chosen from listbox if the page has posted back.
However when I click the Button it shows an Object Reference Error for the following line:
ViewState["items"] = lb1.SelectedItem.Value;
why is this?
thanks
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Seems to me that there there are no selected items when the button is click'ed.
if(lb1.SelectedItem != null)
{
ViewState["items"] = lb1.SelectedItem.Value;
}
If the listbox allso has multiselect = true, you will allso get a problem.
if so you should use
string strValues = "";
foreach(ListItem li in lb1.Items)
{
if(li.Selected)
{
strValuse+=li.Value;
}
}
Hope it helps
Thomas
modified on Monday, October 6, 2008 10:31 AM
|
|
|
|
|
Thanks for the post but it doesnt work Ive got
string strValues = "";
foreach (ListItem li in listbox1.Items)
{
if (li.Selected)
{
strValues += li.Value;
}
}
Session["items"] = strValues;
in the onclick event and then on pageload I have:
lbitems.Text = "Items selected: " + Session["items"].ToString();
The label is shown as blank.
I really dont understand why this is happening, very weird!
Any more help would be great
thanks
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Session is not updated at the time you go to the next page so you should us
ViewState or HttpContext.Current.Items["somevalues"]
If you have multiselect, you should splitt the valuse by somthing, so you can retrive them
Something lik:
if(listbox1.SelectedItem != null){
string strValues = "";
for (int i = 0; i < listbox1.Items.Count;i++)
{
if(listbox1.Items[i].Selected){
strValues += listbox1.Items[i].Value + ",";
}
strValues = strValues .Remove(strValues.Lenght - 1, 1);
}
HttpContext.Current.Items["theItemsValues"] = strValues;
}
on the pageload of the new page:
if(HttpContext.Current.Items.Contains("theItemsValues")) {
lbitems.Text= "Items selected: " +HttpContext.Current.Items["theItemsValues"].ToString();
}
If you then actually needs the items values:
string[] strListOfValues = HttpContext.Current.Items["theItemsValues"].ToString().Splitt(',');
modified on Tuesday, October 7, 2008 5:45 AM
|
|
|
|
|
Thanks, I will try that tomorrow and will get back to you, thnaks for the help!
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Still the problem persists.
This is one of the strangest I have ever seen. Cant understand it.
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Are you showing List item with its id and description ?
Check what is value and what is text for the list item
Try to debug the application whats happening there
Can you tell me what you have to do ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Session["items"] = lb1.SelectedItem.Value;
Response.Redirect("Page.aspx?sql=session["items"].Tostring());
use Session state instread of Viewstate
|
|
|
|
|
Right, below is my code. It is still not working, I thought a new day would bring new answers but no.
PageLoad:
lbitems.Text = "Items selected: " + Session["items"];
Button(This posts back to the same page):
if (listbox1.SelectedItem != null)
{
string strValues = "";
for (int i = 0; i < listbox1.Items.Count - 1; i++)
{
if (listbox1.Items[i].Selected)
{
strValues += listbox1.Items[i].Value + ",";
}
}
strValues += listbox1.Items[listbox1.Items.Count - 1].Value;
Session["items"] = strValues;
}
Response.Redirect("~/main/Page.aspx?sql=items");
Why is this not working?
It doesnt display any selected values.
thanks
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
The code
strValues += listbox1.Items[listbox1.Items.Count - 1].Value;
is wrong becauce you will allways add the last item, no mather if it is selected.
I would recomand the modefide answer I gave you.
Do you redirect to the same page?
|
|
|
|
|
Hello Friend's
I get User Name from Group which created by the system but i cud not get that user from group which created by us. in other word
i get only that user which is builten(Property name of Active directory) in active directory.
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
can you put the code where you read user name from AD along with LDAP Query.
cheers,
Abhijit
Think Sharp | Code Sharp | C Sharp
|
|
|
|
|
Please provide the code den it'll be better
Cheers!!
Brij
|
|
|
|
|
hi,
i need some advice on report writing using asp.net.
currently i am using vs2005 and crystal to write them reports.
is there any other way to get the similar type of reports but using less overhead or could you tell me the best reporting tool for the web environment?
using maybe excel, asp/html????
your opinion will be appreciated...
thanks
Anoop
|
|
|
|
|
Hi
Is it possible to put html coding in stored procedure?
Like so:
select field1, field2 + ' - - ' + field3 as Fields from table
thanks
Hope this question isnt as silly as it sounds!
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|