|
Hi All,
I got some problem with datagrid paging.
I want to show images in grid I did that.But now problem is that if image is having height 180 only two images should be in single page,if image is having height 60 only 6 images should be in single page and remaining should be on nextpage.
I mean I want to know how to set dynamic pagesize.Or any idea u can share with me to solve my problem.
Regards,
Nagraj
|
|
|
|
|
Hi,
Im generating button controls at runtime in a gridview, and need to handle an event on click. so i need to identify the control doing the postback.
Regards,
Tintin
|
|
|
|
|
First of all because you are dealig with dinamically created controls, you are aware that you need to recreate them on postback right?
This[^] will give you a clue about finding out which control generated the postback.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
no, didnt know, where do i do that?
just need to call the same method from all of the dynamicly created buttons.
Regards,
Tintin
|
|
|
|
|
The thing is that the postback resets the page to it's original state, so any information regarding the dynamically created controls is lost. Why is that? Because the Page class is stateless. The Page recreates child controls based on the tags in the aspx files, so your controls not being present there are not shown. What you need to do is recreate the controls in the OnInit event or any event that fires before PageLoad, or in PageLoad if you do a check to see is the page is posted back. See this article[^]as an example.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Hi,
You can declare an event delegate for the button click event, and each button instace command argument property you can add some key to identify the button, then on the click event you can easily identify the event gets fired from which button, if you need code feel free to tell me.
Ram
|
|
|
|
|
Hi guys,
I need to display text value at the tooltip of items in a dropdownlist. Can anyone help?
Thanx
|
|
|
|
|
This article will give you the details of that.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I get a string say "07915 25D3". The problem is, the value before the space can be anything from 1 - 12 in length, and the value after the space anything from 2 - 12 characters.
I just need to get the value after the space, "25D3", in the string. I am not sure how to do this.
|
|
|
|
|
Hi
assuming the character is always a space you could use the split() function:
----------------------------------------------------------
Dim _str As String = "07915 25D3"<br />
dim _s as string = str.Split(" ")(1).ToString
----------------------------------------------------------
In this instance _s will give you the value 25D3.
The argument passed into the split function is a character or number of characters are used to break down the string into an array.
The value of _s is evaluated to the 2nd element of the array (25D3)
Hope this helps
MJ
|
|
|
|
|
Thanks MJ,
It worked perfectly!! Just what I wanted.
|
|
|
|
|
There is one another way to do it.
suppose your string is stored in variable 'strCustId'.
String strRightText = strCustID.Substring(strCustID.IndexOf(" "));
|
|
|
|
|
Hi,
I tried to change datagrid selecteditem background color,if i do this when i mouseover on the datagrid the selectedItem Background color changed but i want mouseover event don`t fired on specific datagridselectedItem.How can i do this?
I have written my mouseover event in datagrid ItemDataBound.
Plz help me anyone,
|
|
|
|
|
give me an example for how to write a user defined functin in asp.net page.in a different class or in the same webform,if in different class we use how to wirite the code and inherit that function in main webform page
kissy
|
|
|
|
|
What's a user defined function?
What you are looking for may be something like this:
public class A
{
public void DoSomething();
}
And then on the web page:
A anInstanceOfA = new A();
anInstanteOfA.DoSomething();
-- modified at 4:48 Thursday 24th August, 2006
|
|
|
|
|
Yes above example is fine if you are using class then put that class in folder app_code
and if you will use
public static void abc()
{
code goes here........
}
in class xyz
then you can access method just by typing xyz.abc();
also you can define your functions in the web page
either using private or protected key wordd
private or protected void abc()
{
code goes here......
}
if you need further assistance dont hesitate to ask.
Naveed Kamboh
|
|
|
|
|
What exactly you want to do buddy... If you want to use nodes as links then use sitmap as the datasource.
|
|
|
|
|
hi. i want the user to select one of the nodes then after filling another fields he click the submit button so i can insert the value of these fields and the selected node value in the table i don't wnat the page to post back when the user select the node.
|
|
|
|
|
Hi,
We have 3 servers, under each servers certain applications(20 applications) are launched. For all these applications the authentication is to be done once(Single-Sign on). But, in case if users session is timeout in one application on one server, how the other applications in other servers can sense the same.
Give some soution for this.
P. Mohan
|
|
|
|
|
I have the solution if two buttons are there differently,but is it possible in a same button.if i click add then save,if i click update then save.add and update code can we write in the same button,if how
kissy
kissy
|
|
|
|
|
I am not able to understand from your message what you are trying to do. I understand that you have two buttons, but I don't understand how you want to change that.
Do you want two buttons that use the same code, or one button that does different things, or one button that does two things?
---
b { font-weight: normal; }
|
|
|
|
|
i want same two has to do different things.please
kissy
|
|
|
|
|
Hi
If u want two different things to do at two different time, I can suggest a solution.
When a record is to be edited, change the text of the button as "Update", and in the same manner, when a new record is to be inserted ,Change the Text of the button as "Insert".
Then on the server side use the Text property of the button to determine what action needs to be taken.
Ex:
On Server Side:
In onButtonClick function you check
switch(button1.text )
{
case"Update":
// Update Block
break;
case"Insert":
//Insert Block
break;
}
I don't know exactly if it'll help you or not. But if you provide me some more information, then i can suggest you something good.
Irshad Ahmad
|
|
|
|
|
ya i had Add,update,save buttons.i have given code differently for both add and update,my problem is i have to call these two functions in save button.after adding a new record i give save,after update also i give save,
so my problem is i need to give code in save button as per the actions i am doing.please if understand give me reply,
thanks for ur answer
kissy
|
|
|
|
|
Probably the answer is same put the update functionality in a function and call that function when you are done with insert in the same button.
Best Regards,
Apurva Kaushal
|
|
|
|