|
You mean to say How to check "\" in regular expression.
/***********************/
* Parwej Ahamad *
* g.parwez@gmail.com *
/***********************/
modified on Monday, December 17, 2007 1:39:59 AM
|
|
|
|
|
|
hi
i'm using a banner management system in my project. in that while we click on the banner it will go to a new page(Track.aspx) with some informations like navigate url and the datas that i need to insert into database for tracking.
i want to open the url specified on the startup of Track.aspx. is it possible to open new window in this case. please help me...
|
|
|
|
|
You can try with window.open() . But I guess if popup blocker is installed, it could block it.
|
|
|
|
|
i think window.open() will not work in this case. because i want to open the new page on the page load of another page. also here getting the url on the page load only.
|
|
|
|
|
Use ClientScript.RegisterStartupScript() to register startup script after you get the URL on page load.
|
|
|
|
|
Hi,
if possible then you can store URL value in session and get it from Javascript and then can open new window on page load of next page.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Dear friend,
I am having an .aspx page in which i have a calendar control.When i select the date in the calendar control,the corressponding date is fixed into a text box which is nearby the calendar control.But i also have to allow the user to enter the date in the textbox without using the calendar control.I need to check whether the date entered by the user is valid..How to do it..?
Pls reply in this regard as early as possible
Regards,
Balaguru
|
|
|
|
|
Hi,
there are lots of ways to do that.
You can use Regx or validation control or Javascript.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hi frndz...
i have a very small problem ..
plz help me out..
last time i aske did qns but no body answered me.. hope dis time get the soln.
i have link button and panel.
i want to display the panel while click on the link button first time and while clicking on the same link button another time dat panel should be disable.
i am only able enable the panel on the first click on the link button.
but how to disble it on 2nd click.
like wise if i clicked on the 3rd time the panel will be enable and if i clicked it 4 4th time d panel will again disable..
plz help me out.i am developing my project n c#.net
|
|
|
|
|
Hi,
try this,
on link button click event check If panel.visible == true then make it false.
Else
make it true.
if(Panel1.Visible == true)<br />
Panel1.Visible = false;<br />
else<br />
Panel1.Visible = true;<br />
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
modified on Monday, December 17, 2007 12:36:25 AM
|
|
|
|
|
Hi you do this in two way :
(1) Server Side :
Link button click Event
if( Session["pnlFlag"] != null )
{
bool flg=(bool)Session["pnlFlag"];
if (Flg == true )
Session["pnlFlag"]=false;
else
Session["pnlFlag"]=true;
}
else
Session["pnlFlag"]=true;
Then on page load
if( Session["pnlFlag"] != null )
yourPanle.visible=(bool)Session["pnlFlag"];
else
//set the default visible of panel what you want
OR
(2)
You can handle it client side mean java script. if you want then let me know
/***********************/
* Parwej Ahamad *
* g.parwez@gmail.com *
/***********************/
|
|
|
|
|
Hi,
Parwej Ahamad wrote: Link button click Event
if( Session["pnlFlag"] != null )
{
bool flg=(bool)Session["pnlFlag"];
if (Flg == true )
Session["pnlFlag"]=false;
else
Session["pnlFlag"]=true;
}
else
Session["pnlFlag"]=true;
Then on page load
if( Session["pnlFlag"] != null )
yourPanle.visible=(bool)Session["pnlFlag"];
else
//set the default visible of panel what you want
OR
Why to use Session ?
No need to use it.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Use ViewState and keep the clicked status there. Check this status on link button click and show/hide it as well.
if(ViewState["PanelVisible"] != null && (bool)ViewState["PanelVisible"] == true)
{
ViewState["PanelVisible"] = false;
}
else
{
ViewState["PanelVisible"] = true;
} use this on your link buttons onclick event.
|
|
|
|
|
N a v a n e e t h wrote: if(ViewState["PanelVisible"] != null && (bool)ViewState["PanelVisible"] == true){ //hide you panel here ViewState["PanelVisible"] = false;}else{ //show your panel here ViewState["PanelVisible"] = true;}
Hi,
Why to use viewstate ??
We can do it in simple way.
Without using ViewState["PanelVisible"] or Session.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
It's the two ways for the problem. Your method also will work, which does what I wrote, internally.
|
|
|
|
|
Hi,
thats true.
But what my question is.
If we can solve it without using viewstate then why to use it ?
Bcoz smart coding it this.
Anyways good to hear that my method can work.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
How about using a DIV tag and writting a javascript to toggle the DIV on the click of Link button?
function ToggleDIV(divid) {
if (document.getElementById(divid).style.display == 'none')
document.getElementById(divid).style.display="inline";
else
document.getElementById(divid).style.display="none";
}
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
I have a checkbox list that is being populated by a database object. User should be able to select more than one option from the checkbox list....now I wanna be able to grab all the values that the user is selecting and be able to put them into a variable....now since there could be more than one value that a user may select, I can't put save them into a string variable...it has to be a string array or something along those lines...to be able to hold multiple variables. Now can someone please post something on here that shown me how to do that.
Thanks
|
|
|
|
|
Hi,
you can use ArrayList and can add selected values in the ArrayList.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Use a generic List<> , which will be type safe. Check this
List<string> objList = new List<string>();
foreach (ListItem item in CheckBoxList1.Items)
{
if (item.Selected)
objList.Add(item.Text);
}
|
|
|
|
|
Hi there, thanks for the speedy response... well I just started out with .Net so I really didnt know about
these generic classes in 2.0, thanks for pointing out, I looked at them and the sample code you posted,
Following is what I kinda came up with.
//Member Level variable
string mJurisdictionSelected = null;
protected void GetUserSelectedValues()
{
string dateSelected = this.mDateRestrictor.SelectedItem.Value.ToString();
//this.dateTest.Text = dateSelected;
//for (int num = 0; num < mJuristictionCheckBoxList.Items.Count; num++)
//string[] jurisdictionName;
string jurisdictionName = null;
System.Collections.Generic.List<string> list = new System.Collections.Generic.List<string>();
foreach (ListItem item in this.mJuristictionCheckBoxList.Items)
{
//ArrayList jurisdictionName = new ArrayList();
if (item.Selected)
{
list.Add(item.Text);
//jurisdictionName = item.Text.ToString();
// this.StateTest.Text = jurisdictionName.ToString();
}
}
this.mDateSelected = dateSelected.ToString();
if (!string.IsNullOrEmpty(jurisdictionName))
//this.mJurisdictionSelected = jurisdictionName.ToString();
this.mJurisdictionSelected = list.ToString();
}
Now as you can see, after retrieving the values (from drop down) into string variable dateSelected
and from checkboxlist into string variable mJurisdictionSelected, I need to pass them to our company's
middle tier folks...so thats why I'm putting them in member level variables....the question regarding
the implemenation you showed me is that " should I just create System.Collections.Generic.List as a member
level thing, outside of the function and then directly keep the values into the list of type System.Collections.Generic.List.
Instead of putting them into string mJurisdictionSelected? I mean the issue is that user could be selecting more than one
value from the checkbox list so is this implemenation you told me about would be able to hanle more than one entry selected
by user in the checkbox list?????? Or do I need like an array or something??? Please help??
Thanks
Sam
-----------------------------
If you don't go after what you want, you'll never have it.
If you don't ask, the answer is always no. If you don't step
forward, you're always in the same place. -Nora Roberts
|
|
|
|
|
Hi there,
What is the difference between App_GlobalResources and App_LocalResources - I am able to place a file (say tmp.txt) under App_LocalResources and still access it from every aspx file.
thx.
|
|
|
|
|
Hi my dears,
Im developing a website in VS2005,
in one of my pages I have 3 UpdatePanels and in eache one I`ve used some server controls. In UpdatePanel1 I have a PlaceHolder server control that I add some Labels to it in runtime . When I run my website these labels will be added to PlaceHolder, but when I click some controls in other UpdatePanels the PlaceHolder in UpdatePanel1 loses all labels.
can you help me to fix this problem ?
Thx a lot my friends,
www.behzadi.net
|
|
|
|
|
hi All,
Please provide any articles with implementation or references on how to implement drag drop and edit with asp.net treeview and save the changes done at client side to database at server side.
any ideas on how to do it are also welcome
thanks in advance
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|