|
Generally we use cmd.parameters in 2003 version of dotnet ,But i saw cmd.addinparameter in 2005 version it is taking 4 parameters .so that i am asking.I need what parameters it will take actually?
Thanks.
|
|
|
|
|
Lazy....VERY LAZY.....[^]
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi,
I have created few pages using DotNetNuke. These are just Home , ABout Us & Contact us.
Now i want to deploye these pages on a server so that i can view as a website.?
How should i do it?
Any one please help me..its very urgent.
KHATRI
|
|
|
|
|
Dear All,
I am using a multiview control , with three views in it. I can switch the views through server side by simply setting the property ActiveViewIndex. But I want to change views on client side. Please help me in this regard.
vijaykrishna v
|
|
|
|
|
Certainly this is not possible as these are server controls and you need to do a post back at the server change the view.
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|
|
You can not do this. The multiview control is a server control. It only sends the client the current view. So there is no way for the client to switch to a different view without going back to the server.
Ben
|
|
|
|
|
hi all....
plz let me know how to retrieve the column names of a given table.....without content(data),just only column names
not like select * from sometable and sp_help sometable
Plz help me,,thanqs in advance
|
|
|
|
|
Hi, how are you..?
you should try this...
use this for loop for getting names of all columns in table...
DataTable dt = new DataTable();
string[] columnsNames = new string[dt.Columns.Count];
for (int i = 0; i < dt.Columns.Count; i++)
{
columnsNames[i] = dt.Columns[i].ColumnName.ToString();
}
Bye ...
Chirag Patel
|
|
|
|
|
hi patel....thanqs,,the code snippet worked for me
|
|
|
|
|
Hi,
I have created few pages using DotNetNuke. These are just Home , ABout Us & Contact us.
Now i want to deploye these pages on a server so that i can view as a website.?
How should i do it?
Any one please help me..its very urgent.
KHATRI
|
|
|
|
|
Hi,
Pls explain the code below .What purpose we use this code in C#
string js=AttachListener('isSelectCheckBox');
Thanks to all repliers.
|
|
|
|
|
It's used to call the AttachListener method. If you want to know what that method does, you have to read any documentation that you may have about it, or examine the code in the method.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I'm trying to build a web control for an application i'm building but i've run into some issues.
Yesterday i suffered an error relating to view state and it seemed that my dynamic control addition was breking things. I've set the control i'm building to disable view state and that problem is solved.
Now it seems that i can't get events back from buttons within the control. These buttons are added at runtime and i've registered as i would for winform or console apps. The function that i've pointed to never gets called.
I assume this is something to do with turning off viewstate. Is it possible to find the name or ID of the button that submitted the form? Is there a better way of using events in this scenario?
Thanks
Russell
|
|
|
|
|
have you added the click event? something like:
<br />
Button btn = new Button();<br />
btn.Click += new System.EventHandler(this.btnEdit_Click);<br />
You could also add the attribut "CommandArgument" or "CommandName" and add an ID number to that button.
Something like:
<br />
btn.CommandArgument = iUserID.ToString();<br />
or<br />
btn.CommandName= iUserID.ToString();<br />
And then:
<br />
private void lbtnEdit_Click(object sender, System.EventArgs e)<br />
{<br />
System.Web.UI.WebControls.Button btn = (System.Web.UI.WebControls.Button)sender;<br />
<br />
int iUserID = int.Parse(btn.CommandArgument); <br />
<br />
}<br />
Hope it helps
Thomas
|
|
|
|
|
hi Russell:
can you post your snippet of code here? I also add controls dynamically and add event handler for those...it's working...
|
|
|
|
|
the code's a bit wrapped up with data code etc at the moment. A lot of the code has come from a very object oriented winform / service app so it's been hacked about a bit.
private TableCell GetButtonCell(string name, string cssClass,string Text)<br />
{<br />
Button newButton = new Button();<br />
newButton.Click+=new EventHandler(Button_Click);<br />
newButton.ID = name;<br />
newButton.CssClass = cssClass;<br />
newButton.Text = Text;<br />
TableCell newCell = new TableCell();<br />
newCell.Controls.Add(newButton);<br />
return newCell;<br />
}
That's the code for adding a new button.
For the moment i've found that only the button that submits the form has its name in the request.form collection so i'm checking in there and calling the Button_Click method from there.
Do you add controls after every post back?
Russell
|
|
|
|
|
yeah..you have to add controls after every postback...try that
<< >>
|
|
|
|
|
i've been adding the controls after every postback but i assumed that there was a problem with adding extras after each postback. I checked the names of the controls and the order they were being added to the controls collection and i couldn't see anything wrong with it.
Russell
|
|
|
|
|
Russell Jones wrote: but i assumed that there was a problem with adding extras after each postback
Nope, actually web is stateless environment...AFAIK
Are you still facing the problem? the event is not get fired?
<< >>
|
|
|
|
|
sorry when i said extras i meant things that are not in the viewstate.
I'm getting all sorts of problems now. The event started working for the first submit of the page but none after that. I've given up on events now, i've got a way of identifying the button, so i'll leave the events till later (I'll come back to it when i've doubled my 3 days ASP.Net experience)
My big problem now is that the controls on the page are displaying incorrect data. It seems that even though i am setting their states in code they are carrying over the values that they previously contained.
http://www.codeproject.com/aspnet/ViewState.asp
this shows a model of how this might occur.
The data in my DB are fine and if i totally reload the page rather than posting back the data on screen look fine.
Russ
|
|
|
|
|
How we can validate the data in the text box which we are getting in gridview by using edit event of grid?
|
|
|
|
|
You can write use validation controls and also you can write your own javascript code to validate the inputs. What you need to do is to write the javascript and attach it to the save button of that gridview.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks Mr Apurva Kaushal.Your reply was verymuch helpful for me.I realy except such a nice reply from u further
|
|
|
|
|
Always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
How we can bind the Grid on one page from another page?
|
|
|
|