|
Wow. A triple post. I would suggest you need to learn about how things work here. Read the FAQs and gain some insight into why you are being downvoted. There is no intent by anyone to "insult" you. The people downvoting you do not know you, they are simply critiquing your answers based on the content and the forum rules. I would suggest you take the advice provided.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
hi
How to Preview Image Before Upload in the asp.net
thanks
|
|
|
|
|
Upload the image to the server asynchronously using Ajax, and then, show it dynamically as a preview.
|
|
|
|
|
I am working on trying to load some control code that is saved in a text file. The code is constructed of ASP.Net controls but could consist of any type of control from PlaceHolder, LliteralControl, TextBox, etc. How can I load this into a control located on the page?
for example, I could pull this from a file or database.
<asp:textbox runat="server" id="textbox1">
<asp:label runat="server" id="label1">
Control c = new Control();
//How to get raw text to control and add control to page???
c.????
Page.Controls.Add(c);
|
|
|
|
|
Found it.
c.ParseControl()
|
|
|
|
|
Hi,
I have a repeater in my aspx page. The datasource for this will change for different types of call hence I cannot do
<ItemTemplate>
<tr >
<td bgcolor="" valign="top">
<%#DataBinder.Eval(Container.DataItem, "Id")%>
</td>
...
</tr>
</ItemTemplate>
as the dataItem will be different. Which is the best way to do it server side?
Thanks,
|
|
|
|
|
If you want to use DataBinding like this you would need to convert each datasource to use the same columns, with the same names. Not a bad thing. If the datasources will all have different columns with different types you may want to use a DataGrid and set AutoGenerateColumns=true;
Otherwise, you will need to manually add ITemplates to your repeater based on the selected datasource
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
yes I had set the autogenerate columns as true and it works fine.
Issue is I also had a jquery to select the selected row value and it ended up having lots of magic numbers for the colums in different states. Very difficult to understand and maintain. I want to access dataItem value on row click and hence trying to map dynamically .
Thanks,
|
|
|
|
|
How can I get server side validators to work with JQuery UI Modal with validation groups ?
|
|
|
|
|
Query has nothing to do with server side code. If you want they server side validation events to fire then have the page do a post back.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Actually the problem was modal being attached outside of tag. Can you suggest any other jquery validation plugin which emulates validation groups on asp.net webforms ?
|
|
|
|
|
If the controls are not inside a form tag it doesn't matter, the validators won't work anyway. Is there a reason you need to use a server validation method? You can't use Page_Vaiidate("validation group name") within javascript?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I have different jQuery UI Modal dialogs on a webform. I need to emulate validation groups on each UI Modal so I was trying server side validators because I could not emulate validation groups with jQuery. I did not knew about page_validate previously. What do you suggest ? Should I just fire the server validation groups with Page_Validate or do I use a separate plugin ?
|
|
|
|
|
Page_Validate will not fire server validation methods, it will perform the validations on the client.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi , i've added some labels to my webform at runtime . the "runat" attribute is set to "server" . now i want to get each label's innertext by severside controls like <asp:button>.
how to get the runtime made labels via asp?
|
|
|
|
|
If you created the controls at run time rather than in the aspx markup then you need to recreate the controls during a post back in order for them to be recognized again.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
so i cant use my ideas . thx
|
|
|
|
|
As i said, if the controls are created dynamically then they must also be recreated during apostback. There are many examples of this. Most server controls use this technique.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Correct
Wonde Tadesse
MCTS
|
|
|
|
|
As Mark said, In order to work with controls that are created in runtime, you must recreate the controls each time a postback is occurred.
Wonde Tadesse
MCTS
|
|
|
|
|
You can use it's Parent's FindControl method like this:
var lbl = document.getElementById('<%= parentConrol.FindControl('myLabel').ClientID %>');
var text = lbl.innerHTML;
|
|
|
|
|
good , but there is another problem with testing this way, the parent controls are being added runtime. and the Id of controls is identified by user at runtime too.anyway, thank u .
|
|
|
|
|
Not even close to what the OP was asking for. I guess you missed the part about server side.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
If you see the OP's response to my solution, you can infer that s/he actually meant accessing the innerHTML using a javascript method called from a button's onclick.
|
|
|
|
|
Shameel wrote: s/he actually meant
And we can infer from this that you are a mind reader. Does that make it true or correct?
I know the language. I've read a book. - _Madmatt
|
|
|
|